https://github.com/reductstore/reduct-rs

ReductStore Client SDK for Rust

https://github.com/reductstore/reduct-rs

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.1%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

ReductStore Client SDK for Rust

Basic Info
Statistics
  • Stars: 7
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 17
Created over 2 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog License

README.md

ReductStore Client SDK for Rust

Crates.io Docs.rs GitHub Workflow Status

This package provides an HTTP client for interacting with the ReductStore, time-series database for unstructured data.

Features

Example

```rust use futuresutil::stream::StreamExt; use reductrs::{QuotaType, ReductClient, ReductError}; use serde_json::json; use std::pin::pin; use std::time::{Duration, SystemTime}; use tokio;

[tokio::main]

async fn main() -> Result<(), ReductError> { // 1. Create a ReductStore client let client = ReductClient::builder() .url("http://127.0.0.1:8383") .api_token("my-token") .build();

// 2. Get or create a bucket with 1Gb quota
let bucket = client
    .create_bucket("my-bucket")
    .quota_type(QuotaType::FIFO)
    .quota_size(1_000_000_000)
    .exist_ok(true)
    .send()
    .await?;

// 3. Write some data with timestamps and labels to the 'entry-1' entry
let start = SystemTime::now();
bucket
    .write_record("sensor-1")
    .data("<Blob data>")
    .timestamp(start)
    .add_label("score", 10)
    .send()
    .await?;

bucket
    .write_record("sensor-1")
    .data("<Blob data>")
    .timestamp(start + Duration::from_secs(1))
    .add_label("score", 20)
    .send()
    .await?;

// 4. Query the data by time range and condition
let query = bucket
    .query("sensor-1")
    .start(start)
    .stop(start + Duration::from_secs(2))
    .when(json!({"&score": {"$gt": 15}}))
    .send()
    .await?;

let mut query = pin!(query);
while let Some(record) = query.next().await {
    let record = record?;
    println!("Record timestamp: {:?}", record.timestamp());
    println!("Record size: {}", record.content_length());
    println!("{:?}", record.bytes().await?);
}

// 5. Exit
Ok(())

}

```

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

Supported ReductStore Versions and Backward Compatibility

The library is backward compatible with the previous versions. However, some methods have been deprecated and will be removed in the future releases. Please refer to the Changelog for more details. The SDK supports the following ReductStore API versions:

  • v1.16
  • v1.15
  • v1.14

It can work with newer and older versions, but it is not guaranteed that all features will work as expected because the API may change and some features may be deprecated or the SDK may not support them yet.

Owner

  • Name: ReductStore
  • Login: reductstore
  • Kind: organization
  • Email: info@reduct.store
  • Location: Germany

A time series database for storing and managing large amounts of blob data

GitHub Events

Total
  • Create event: 13
  • Issues event: 3
  • Release event: 4
  • Watch event: 2
  • Delete event: 9
  • Issue comment event: 1
  • Push event: 34
  • Pull request review comment event: 1
  • Pull request event: 22
Last Year
  • Create event: 13
  • Issues event: 3
  • Release event: 4
  • Watch event: 2
  • Delete event: 9
  • Issue comment event: 1
  • Push event: 34
  • Pull request review comment event: 1
  • Pull request event: 22

Packages

  • Total packages: 1
  • Total downloads:
    • cargo 32,688 total
  • Total dependent packages: 2
  • Total dependent repositories: 0
  • Total versions: 26
  • Total maintainers: 1
crates.io: reduct-rs

ReductStore Client SDK for Rust.

  • Versions: 26
  • Dependent Packages: 2
  • Dependent Repositories: 0
  • Downloads: 32,688 Total
Rankings
Dependent repos count: 29.8%
Dependent packages count: 32.1%
Average: 53.4%
Downloads: 98.2%
Maintainers (1)
Last synced: 10 months ago

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v4 composite
  • actions/checkout v2 composite
  • arduino/setup-protoc v1 composite
  • dtolnay/rust-toolchain stable composite
Cargo.toml cargo
  • rstest 0.18.1 development
  • test-with 0.12.5 development
  • tokio 1.0 development
  • async-channel 2.1.1
  • async-stream 0.3.5
  • bytes 1.4.0
  • chrono 0.4.11
  • futures 0.3.17
  • futures-util 0.3.28
  • http 1.0.0
  • reqwest 0.11
  • rustls 0.23
  • serde 1.0
  • serde_json 1.0
  • tokio 1.0