Metadata-Version: 2.4
Name: gluex-ccdb
Version: 0.2.1
Classifier: License :: OSI Approved :: Apache Software License
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Dist: pytest ; extra == 'tests'
Provides-Extra: tests
Summary: Python bindings for accessing GlueX CCDB tables
Keywords: gluex,ccdb,sqlite,calibration
Home-Page: https://github.com/denehoffman/gluex-rs
Author-email: Nathaniel Dene Hoffman <dene@cmu.edu>
License: Apache-2.0 OR MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://github.com/denehoffman/gluex-rs/tree/main/crates/gluex-ccdb-py
Project-URL: Homepage, https://github.com/denehoffman/gluex-rs
Project-URL: Issues, https://github.com/denehoffman/gluex-rs/issues
Project-URL: Repository, https://github.com/denehoffman/gluex-rs

# gluex-ccdb (Python)

Python bindings around the `gluex-ccdb` Rust crate. They expose lightweight wrappers for CCDB
directories, tables, and columnar payloads without compromising type information.

## Installation

```bash
uv pip install gluex-ccdb
```

## Example

```python
import gluex_ccdb as ccdb

# Uses CCDB_CONNECTION by default; pass a path to override.
client = ccdb.CCDB()
tables = client.fetch("/PHOTON_BEAM/pair_spectrometer/lumi/trig_live", runs=[55_000, 55_005])

for run, dataset in tables.items():
    print(f"columns: {dataset.column_names()}")
    livetime = float(dataset.column(1).row(0))
    print(f"run {run}: livetime = {livetime:.3f}")
```

## License

Dual-licensed under Apache-2.0 or MIT.

