ASAM ODSBox
The ODSBox is a lightweight Python wrapper on the standardized ASAM ODS REST API. It simplifies the handling of ASAM ODS data in Python by utilizing intuitive JAQuel queries and pandas DataFrames.
Features
- Lightweight Python wrapper for the ASAM ODS HTTP API.
- Intuitive querying using JAQuel Query Language.
- Seamless integration with pandas DataFrames for data analysis.
- Includes generated ASAM ODS protobuf stubs.
- Supports authentication mechanisms via requests.
- Bulk helper for quantity data access as pandas DataFrames.
Quick Start
- Install ODSBox:
pip install odsbox - Connect to an ASAM ODS server:
from odsbox import ConI with ConI(url="https://MY_SERVER/api", auth=("USERNAME", "PASSWORD")) as con_i: measurements = con_i.query( { "AoMeasurement": {"name": {"$like": "*"}}, "$attributes": {"name": 1, "id": 1}, "$options": {"$rowlimit": 50}, } ) print(measurements) # print pandas DataFrame with column "name" and "id"
Documentation
Communication
The ASAM ODS server communicates via HTTP calls as specified in the ASAM ODS standard, which defines a RESTful API for accessing and manipulating measurement data. This allows for standardized interactions, including operations like querying, creating, updating, and deleting entities such as measurements, tests, and results.
Data exchanged between the client (e.g., ODSBox) and the server is encoded and decoded using Protocol Buffers (protobuf), a binary serialization format developed by Google. Protobuf ensures efficient, compact, and fast data transfer compared to text-based formats like JSON, making it ideal for handling large datasets in technical measurement scenarios. The official protobuf message definitions are available in the ASAM-ODS-Interfaces repository.
Requests use the custom content type application/x-asamods+protobuf to indicate protobuf-encoded payloads. ODSBox abstracts these low-level details, allowing developers to interact with the API using intuitive Python dictionaries and methods, while handling authentication (e.g., via username/password or tokens) and connection management seamlessly.
JAQuel Queries
JAQuel enables intuitive data querying, drawing inspiration from the MongoDB Query Language (MQL). Its JSON-based query expressions seamlessly integrate with Python as dictionaries, offering a powerful and user-friendly approach to data retrieval.
Installation
ODSBox is available on PyPI and GitHub.
| github | https://github.com/peak-solution/odsbox/ |
| PyPI | https://pypi.org/project/odsbox/ |
| github docs | https://peak-solution.github.io/odsbox |
# access ASAM ODS server
pip install odsbox
# access ASAM ODS EXD-API plugin
pip install odsbox[exd-data]
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License.
Metadata
Release files for odsbox 1.10.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| odsbox-1.10.1.tar.gz | 68.9 kB | Without provenance | Details for odsbox-1.10.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| odsbox-1.10.1-py3-none-any.whl | Python 3 | none | any | Details for odsbox-1.10.1-py3-none-any.whl |
Total release size: 146.2 kB
Release files / odsbox-1.10.1.tar.gz
| Download URL | odsbox-1.10.1.tar.gz |
|---|---|
| Size | 68.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e38166623fb06731181702dce6d643888d48e0a6635e88439f203f2acd0440e
|
|
BLAKE2b-256 checksum How to use checksums |
96b83b7a6e5a8f2cebd7b327f8cf4f57992c35a5628a86a6fcbc90ed89ce98e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / odsbox-1.10.1-py3-none-any.whl
| Download URL | odsbox-1.10.1-py3-none-any.whl |
|---|---|
| Size | 77.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c5c2688654f81d7740228db56db1f52c29643e1a38220047249eaff558e5f513
|
|
BLAKE2b-256 checksum How to use checksums |
9d65ffe7a47b9fc866115b8c9c8818e65709fbee919909f0d85f7b542289a030
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for odsbox 1.10.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.