DEV Community

Cover image for ReductStore Client SDK for Python v1.2.0: New Features and Example Use
Alexey Timin for ReductStore

Posted on • Originally published at reduct.store

3

ReductStore Client SDK for Python v1.2.0: New Features and Example Use

Hello, everyone!
We are excited to announce the release of
the Python client SDK v1.2.0! This release includes
support for the
ReductStore HTTP API v1.2 and several other
improvements.

One of the new features in this release is the Client.me() method. This method allows you to get information about the
current token being used to authenticate with the ReductStore instance. It returns a FullTokenInfo object, which
contains
information about the token, including its name, creation time, and permissions.

To use the method, simply call it on a Client instance:

from reduct import Client

client = Client('https://play.reduct.store', api_token='my-token')

# Get the current token info
token_info = await client.me()

# Print the token name and creation time
print(f"Token name: {token_info.name}")
print(f"Token created at: {token_info.created_at}")

# Print the token permissions
print(f"Full access: {token_info.permissions.full_access}")
print(f"Read access: {token_info.permissions.read}")
print(f"Write access: {token_info.permissions.write}")
Enter fullscreen mode Exit fullscreen mode

In addition to the Client.me method, this release also includes improvements to the documentation and a migration to
using a
pyproject.toml file to manage dependencies.

To upgrade to the latest version of the reduct-py SDK, run the following command:

pip install -U reduct-py
Enter fullscreen mode Exit fullscreen mode

if you have any questions or feedback, don't hesitate to reach out in Discord
or by opening a discussion on GitHub.

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more