Kaitai Struct: Awkward Array runtime
This project bridges Kaitai Struct schemas to Awkward Arrays. It provides a C++ runtime plus Python helpers so Kaitai-generated parsers can emit Awkward Array buffers directly.
Quickstart
- Generate C++ from a
.ksyschema using the Kaitai compiler with the Awkward target. - Build a shared library from the generated
.cpp. - Load binary data into an Awkward Array.
Example flow:
# From a schema (requires kaitai-struct-compiler with awkward target)
java -cp <classpath> io.kaitai.struct.JavaMain -t awkward --outdir test_artifacts example_data/schemas/hello_world.ksy
# Build a shared library from the generated C++ file
awkward-kaitai-build test_artifacts/hello_world.cpp -b build
from awkward_kaitai import Reader
reader = Reader("test_artifacts/libhello_world.so")
array = reader.load("example_data/data/hello_world.bin")
print(array)
Documentation
The documentation is available at https://det-lab.github.io/kaitai_struct_awkward_runtime/.
Requirements
- Kaitai Struct compiler 0.11+ with the
awkwardtarget. - CMake and a C++ toolchain for building shared libraries.
Development
- Build and test everything:
make test - Fast loop for a single schema:
make compile_test testcase=hello_world - Linting and checks:
nox -s lint/nox -s pylint/nox -s tests - Submodule setup:
git submodule update --init --recursive
See AGENTS.md for detailed contributor guidance.
Related Papers and Talks
- Describe Data to get Science-Data-Ready Tooling: Awkward as a Target for Kaitai Struct YAML, Advanced Computing and Analysis Techniques for Physics Research Workshop 2024, New York, US.
- Awkward Target for Kaitai Struct, PyHEP Users Workshop 2023.
Metadata
Release files for awkward_kaitai 0.11.2
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 |
|---|---|---|---|---|
| awkward_kaitai-0.11.2.tar.gz | 1.5 MB | Without provenance | Details for awkward_kaitai-0.11.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| awkward_kaitai-0.11.2-py3-none-any.whl | Python 3 | none | any | Details for awkward_kaitai-0.11.2-py3-none-any.whl |
Total release size: 1.5 MB
Release files / awkward_kaitai-0.11.2.tar.gz
| Download URL | awkward_kaitai-0.11.2.tar.gz |
|---|---|
| Size | 1.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0082dd08e662dba6b1a0ae2637aea1f2b18555753ddce9adb56a1e4ddd2744a3
|
|
BLAKE2b-256 checksum How to use checksums |
c44dceae0d8b34a48a23ca2eeb11077a99a17dfc458a9c39432351d80e73291b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.3 cpython/3.11.2 HTTPX/0.28.1
|
Release files / awkward_kaitai-0.11.2-py3-none-any.whl
| Download URL | awkward_kaitai-0.11.2-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65910f028c113884888e88b2b2bb475726f328a2ca9d002ac7ed8259ece35547
|
|
BLAKE2b-256 checksum How to use checksums |
2c59848faeb786a2adc871d2d0cd3df6b72a35adbc4960a88de21f3edf9425d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.3 cpython/3.11.2 HTTPX/0.28.1
|
Security for awkward_kaitai 0.11.2
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.