gluex-rcdb-py

Crates.iogluex-rcdb-py
lib.rsgluex-rcdb-py
version0.1.5
created_at2025-12-18 17:05:37.202979+00
updated_at2026-01-22 18:33:11.450415+00
descriptionPython bindings for the gluex-rcdb Rust crate
homepagehttps://github.com/denehoffman/gluex-rs
repositoryhttps://github.com/denehoffman/gluex-rs
max_upload_size
id1992887
size55,001
Nathaniel D. Hoffman (denehoffman)

documentation

README

gluex-rcdb (Python)

Python bindings for the gluex-rcdb crate. This library provides a simple interface for loading run conditions from RCDB which match the given context (run numbers and filters). It also provides common aliases used to determine production data.

Installation

uv pip install gluex-rcdb

Example

import gluex_rcdb as rcdb

client = rcdb.RCDB("/data/rcdb.sqlite")
filters = rcdb.all(
    rcdb.float_cond("polarization_angle").gt(90.0),
    rcdb.aliases.is_production,
)
run_list = client.fetch_runs(run_min=55_000, run_max=55_020, filters=filters)
values = client.fetch(["polarization_direction", "polarization_angle"], runs=run_list)
for run, payload in values.items():
    print(run, float(payload["polarization_direction"]))

License

Dual-licensed under Apache-2.0 or MIT.

Commit count: 77

cargo fmt