An Interest In:
Web News this Week
- March 21, 2024
- March 20, 2024
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
- March 15, 2024
August 24, 2022 07:47 pm GMT
Original Link: https://dev.to/reduct-storage/reduct-storage-python-sdk-v040-has-been-released-4k6a
Reduct Storage Python SDK v0.4.0 has been released
This is a little update from the Reduct Storage project. Today, we have released Reduct Storage Client SDK for Python v0.4.0.
Now the SDK supports Reduct Storage HTTP API v0.7, so you can get records for a time interval (or all records in an entry) as asynchronous iterator:
import asynciofrom reduct import Client, Bucketasync def main(): client = Client('https://play.reduct-storage.dev', api_token="reduct") bucket: Bucket = await client.create_bucket("my-bucket", exist_ok=True) # Query all data in entry async for record in bucket.query("entry-1"): print(f"Time={record.timestamp}, Size={record.size} bytes") print("Content: ", await record.read_all())loop = asyncio.new_event_loop()loop.run_until_complete(main())
Don't forget to update your pip package ;)
pip install -U reduct-py
Original Link: https://dev.to/reduct-storage/reduct-storage-python-sdk-v040-has-been-released-4k6a
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To