ReductStore Client SDK for Python
Project description
ReductStore Client SDK for Python
This package provides an asynchronous HTTP client for interacting with the ReductStore service.
Features
- Supports the ReductStore HTTP API v1.5
- Bucket management
- API Token management
- Write, read and query data
- Labels
- Batching records
- Subscription on new data
Install
To install this package, run the following command:
pip install reduct-py
Example
Here is an example of how to use this package to create a bucket, write data to it, and read data from it:
import time
import asyncio
from reduct import Client, Bucket
async def main():
# Create a client for interacting with a ReductStore service
client = Client("http://localhost:80383")
# Create a bucket and store a reference to it in the `bucket` variable
bucket: Bucket = await client.create_bucket("my-bucket", exist_ok=True)
# Write data to the bucket
ts = time.time_ns() / 1000
await bucket.write("entry-1", b"Hey!!", ts)
# Read data from the bucket
async with bucket.read("entry-1", ts) as record:
data = await record.read_all()
print(data)
# Run the main function
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
For more examples, see the Quick Start.
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
reduct_py-1.5.0-py3-none-any.whl
(12.0 kB
view details)
File details
Details for the file reduct_py-1.5.0-py3-none-any.whl.
File metadata
- Download URL: reduct_py-1.5.0-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccff1bd75cb9d4d91ced83b8aee0b85c4ee2b104f11a9c9e24e9f80fe4201ece
|
|
| MD5 |
3992e3411d3287bd2437043d7fcfb773
|
|
| BLAKE2b-256 |
77518880ee89de37c337d8af6da5f6813a062a74e9bb70d59aa93e92aaf12f2c
|