DEV Community

Cover image for Reduct Storage Python Client Release v1.0.0
aschenbecherwespe for ReductStore

Posted on

Reduct Storage Python Client Release v1.0.0

Hello dev.to,

This post is an announcement for the release of v1.0.0 of our Python client for Reduct Storage.

The client has ben updated for compatibility with v1.0.0 of the storage engine's API, which is described here.

The released package and release notes can be found on Github or to use it right away you can:

pip install reduct-py
Enter fullscreen mode Exit fullscreen mode

This version drops the bucket.read_by method in favour of bucket.query and a newly improved bucket.read method.

bucket.read now returns an asynchronous context, within which data can be loaded from the storage at the desired point with the Record.read() or Record.read_all() methods:

async with bucket.read("entry-1", timestamp=1_000_000) as record:
  data = await record.read_all()
  print(data)
Enter fullscreen mode Exit fullscreen mode

The perviously deprecated bucket.list() method has also been removed, it's functionality having been replaced by bucket.query():

records: List[Record] = [
        record
        async for record in bucket.query("entry-1", start=0, stop=5_000_000)
    ]
Enter fullscreen mode Exit fullscreen mode

Think that's all for this post!

May your data storage be robust 🫡

Top comments (0)