Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
PyPI

reduct-py 1.14.0

pip install reduct-py

Latest version

Released:

ReductStore Client SDK for Python

Verified details

These details have beenverified by PyPI
Maintainers
Avatar for flipback from gravatar.com flipback

Unverified details

These details havenot been verified by PyPI
Project links
Meta
  • License: MIT License (MIT License)
  • Author:Ciaran Moyne
  • Maintainer:Alexey Timin
  • Tags sdk, reductstore, api client, database, time series database
  • Requires: Python >=3.8
  • Provides-Extra:test,lint,format

Project description

ReductStore Client SDK for Python

PyPIPyPI - DownloadsGitHub Workflow Status

This package provides an asynchronous HTTP client for interacting withReductStore in Python.

Features

  • Supports theReductStore HTTP API v1.14
  • Bucket management
  • API Token management
  • Write, read and query data
  • Labeling records
  • Batching records for read and write operations
  • Subscription
  • Replication management

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:

fromreductimportClient,BucketSettings,QuotaTypeasyncdefmain():# 1. Create a ReductStore clientasyncwithClient("http://localhost:8383",api_token="my-token")asclient:# 2. Get or create a bucket with 1Gb quotabucket=awaitclient.create_bucket("my-bucket",BucketSettings(quota_type=QuotaType.FIFO,quota_size=1_000_000_000),exist_ok=True,)# 3. Write some data with timestamps in the 'entry-1' entryawaitbucket.write("sensor-1",b"<Blob data>",timestamp="2024-01-01T10:00:00Z",labels={"score":10})awaitbucket.write("sensor-1",b"<Blob data>",timestamp="2024-01-01T10:00:01Z",labels={"score":20})# 4. Query the data by time range and conditionasyncforrecordinbucket.query("sensor-1",start="2024-01-01T10:00:00Z",stop="2024-01-01T10:00:02Z",when={"&score":{"$gt":10}}):print(f"Record timestamp:{record.timestamp}")print(f"Record size:{record.size}")print(awaitrecord.read_all())# 5. Run the main functionif__name__=="__main__":importasyncioasyncio.run(main())

For more examples, see theGuides section in the ReductStore documentation.

Project details

Verified details

These details have beenverified by PyPI
Maintainers
Avatar for flipback from gravatar.com flipback

Unverified details

These details havenot been verified by PyPI
Project links
Meta
  • License: MIT License (MIT License)
  • Author:Ciaran Moyne
  • Maintainer:Alexey Timin
  • Tags sdk, reductstore, api client, database, time series database
  • Requires: Python >=3.8
  • Provides-Extra:test,lint,format

Download files

Download the file for your platform. If you're not sure which to choose, learn more aboutinstalling packages.

Source Distributions

No source distribution files available for this release.See tutorial ongenerating distribution archives.

Built Distribution

reduct_py-1.14.0-py3-none-any.whl (19.3 kBview details)

UploadedPython 3

File details

Details for the filereduct_py-1.14.0-py3-none-any.whl.

File metadata

  • Download URL: reduct_py-1.14.0-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for reduct_py-1.14.0-py3-none-any.whl
AlgorithmHash digest
SHA256be8bfab140e5f90ba87b00956e44423ddd51eba1d446996f308349b632372f4f
MD56bfccb4b1ccbe0a114d4105fbd78e1a0
BLAKE2b-256e8cd229ed1f992d2beee8bcd0907b71be9cbc9e122f81e3c7bcd4854c55b17f1

See more details on using hashes here.

Supported by

AWSAWS Cloud computing and Security SponsorDatadogDatadog MonitoringFastlyFastly CDNGoogleGoogle Download AnalyticsPingdomPingdom MonitoringSentrySentry Error loggingStatusPageStatusPage Status page

[8]ページ先頭

©2009-2025 Movatter.jp