gluex-ccdb 0.1.3__cp314-cp314t-musllinux_1_2_i686.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
gluex_ccdb/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ from .gluex_ccdb import *
2
+
3
+ __doc__ = gluex_ccdb.__doc__
4
+ if hasattr(gluex_ccdb, "__all__"):
5
+ __all__ = gluex_ccdb.__all__
@@ -0,0 +1,129 @@
1
+ from datetime import datetime
2
+
3
+ class ColumnType:
4
+ @property
5
+ def name(self) -> str: ...
6
+
7
+ class ColumnMeta:
8
+ @property
9
+ def id(self) -> int: ...
10
+ @property
11
+ def name(self) -> str: ...
12
+ @property
13
+ def column_type(self) -> ColumnType: ...
14
+ @property
15
+ def order(self) -> int: ...
16
+ @property
17
+ def comment(self) -> str: ...
18
+
19
+ class TypeTableMeta:
20
+ @property
21
+ def id(self) -> int: ...
22
+ @property
23
+ def name(self) -> str: ...
24
+ @property
25
+ def n_rows(self) -> int: ...
26
+ @property
27
+ def n_columns(self) -> int: ...
28
+ @property
29
+ def comment(self) -> str: ...
30
+
31
+ class Column:
32
+ @property
33
+ def name(self) -> str: ...
34
+ @property
35
+ def column_type(self) -> ColumnType: ...
36
+ def row(self, row: int) -> object: ...
37
+ def values(self) -> list[object]: ...
38
+
39
+ class RowView:
40
+ @property
41
+ def n_columns(self) -> int: ...
42
+ @property
43
+ def column_types(self) -> list[ColumnType]: ...
44
+ def value(self, column: int | str) -> object | None: ...
45
+ def columns(self) -> list[tuple[str, ColumnType, object]]: ...
46
+
47
+ class Data:
48
+ @property
49
+ def n_rows(self) -> int: ...
50
+ @property
51
+ def n_columns(self) -> int: ...
52
+ @property
53
+ def column_names(self) -> list[str]: ...
54
+ @property
55
+ def column_types(self) -> list[ColumnType]: ...
56
+ def column(self, column: int | str) -> Column: ...
57
+ def row(self, row: int) -> RowView: ...
58
+ def rows(self) -> list[RowView]: ...
59
+ def value(self, column: int | str, row: int) -> object | None: ...
60
+
61
+ class TypeTableHandle:
62
+ @property
63
+ def name(self) -> str: ...
64
+ @property
65
+ def id(self) -> int: ...
66
+ @property
67
+ def meta(self) -> TypeTableMeta: ...
68
+ def full_path(self) -> str: ...
69
+ def columns(self) -> list[ColumnMeta]: ...
70
+ def fetch(
71
+ self,
72
+ *,
73
+ runs: list[int] | None = None,
74
+ variation: str | None = None,
75
+ timestamp: str | datetime | None = None,
76
+ ) -> dict[int, Data]: ...
77
+ def fetch_run_period(
78
+ self,
79
+ *,
80
+ run_period: str,
81
+ rest_version: int | None = None,
82
+ variation: str | None = None,
83
+ timestamp: str | datetime | None = None,
84
+ ) -> dict[int, Data]: ...
85
+
86
+ class DirectoryHandle:
87
+ def full_path(self) -> str: ...
88
+ def parent(self) -> DirectoryHandle | None: ...
89
+ def dirs(self) -> list[DirectoryHandle]: ...
90
+ def dir(self, path: str) -> DirectoryHandle: ...
91
+ def tables(self) -> list[TypeTableHandle]: ...
92
+ def table(self, name: str) -> TypeTableHandle: ...
93
+
94
+ class CCDB:
95
+ def __init__(self, path: str) -> None: ...
96
+ @property
97
+ def connection_path(self) -> str: ...
98
+ def dir(self, path: str) -> DirectoryHandle: ...
99
+ def table(self, path: str) -> TypeTableHandle: ...
100
+ def root(self) -> DirectoryHandle: ...
101
+ def fetch(
102
+ self,
103
+ path: str,
104
+ *,
105
+ runs: list[int] | None = None,
106
+ variation: str | None = None,
107
+ timestamp: str | datetime | None = None,
108
+ ) -> dict[int, Data]: ...
109
+ def fetch_run_period(
110
+ self,
111
+ path: str,
112
+ *,
113
+ run_period: str,
114
+ rest_version: int | None = None,
115
+ variation: str | None = None,
116
+ timestamp: str | datetime | None = None,
117
+ ) -> dict[int, Data]: ...
118
+
119
+ __all__ = [
120
+ "CCDB",
121
+ "Column",
122
+ "ColumnMeta",
123
+ "ColumnType",
124
+ "Data",
125
+ "DirectoryHandle",
126
+ "RowView",
127
+ "TypeTableHandle",
128
+ "TypeTableMeta",
129
+ ]
gluex_ccdb/py.typed ADDED
File without changes
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.4
2
+ Name: gluex-ccdb
3
+ Version: 0.1.3
4
+ Classifier: License :: OSI Approved :: Apache Software License
5
+ Classifier: License :: OSI Approved :: MIT License
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Programming Language :: Python :: 3.8
8
+ Classifier: Programming Language :: Python :: 3.9
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Rust
13
+ Classifier: Programming Language :: Python :: Implementation :: CPython
14
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
15
+ Requires-Dist: pytest ; extra == 'tests'
16
+ Provides-Extra: tests
17
+ Summary: Python bindings for accessing GlueX CCDB tables
18
+ Keywords: gluex,ccdb,sqlite,calibration
19
+ Home-Page: https://github.com/denehoffman/gluex-rs
20
+ Author-email: Nathaniel Dene Hoffman <dene@cmu.edu>
21
+ License: Apache-2.0 OR MIT
22
+ Requires-Python: >=3.8
23
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
24
+ Project-URL: Documentation, https://github.com/denehoffman/gluex-rs/tree/main/crates/gluex-ccdb-py
25
+ Project-URL: Homepage, https://github.com/denehoffman/gluex-rs
26
+ Project-URL: Issues, https://github.com/denehoffman/gluex-rs/issues
27
+ Project-URL: Repository, https://github.com/denehoffman/gluex-rs
28
+
29
+ # gluex-ccdb (Python)
30
+
31
+ Python bindings around the `gluex-ccdb` Rust crate. They expose lightweight wrappers for CCDB
32
+ directories, tables, and columnar payloads without compromising type information.
33
+
34
+ ## Installation
35
+
36
+ ```bash
37
+ uv pip install gluex-ccdb
38
+ ```
39
+
40
+ ## Example
41
+
42
+ ```python
43
+ import gluex_ccdb as ccdb
44
+
45
+ client = ccdb.CCDB("/data/ccdb.sqlite")
46
+ tables = client.fetch("/PHOTON_BEAM/pair_spectrometer/lumi/trig_live", runs=[55_000, 55_005])
47
+
48
+ for run, dataset in tables.items():
49
+ print(f"columns: {dataset.column_names()}")
50
+ livetime = float(dataset.column(1).row(0))
51
+ print(f"run {run}: livetime = {livetime:.3f}")
52
+ ```
53
+
54
+ ## License
55
+
56
+ Dual-licensed under Apache-2.0 or MIT.
57
+
@@ -0,0 +1,8 @@
1
+ gluex_ccdb/__init__.py,sha256=_IBaaUuVbaNfWH0Hj17n4yJE-rhqTOTSQUxdb9DaqO4,123
2
+ gluex_ccdb/__init__.pyi,sha256=sMyKOJOLF93rnCIZtnxAmnyI9WNp5OKM-9ATobDn0q8,3425
3
+ gluex_ccdb/gluex_ccdb.cpython-314t-i386-linux-musl.so,sha256=V1EaG6PE4NP3Jfcb3g5xTIrTNMTqCOFxjsnqT8wp_F8,3341537
4
+ gluex_ccdb/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ gluex_ccdb-0.1.3.dist-info/METADATA,sha256=qkOKocgiD0KpWOEYKfOE9ROyKZRMaVfjLvZcgSA3SYs,2007
6
+ gluex_ccdb-0.1.3.dist-info/WHEEL,sha256=hjgk59J2JlXrTHXMVvei475Dds72pYSoQNOLLhPn0jA,107
7
+ gluex_ccdb.libs/libgcc_s-f5fcfe20.so.1,sha256=AgqyMrWe8E5-efp_cXekgnQn-q6zJOV7u8ZBzQVlfJc,552385
8
+ gluex_ccdb-0.1.3.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.11.5)
3
+ Root-Is-Purelib: false
4
+ Tag: cp314-cp314t-musllinux_1_2_i686
Binary file