Python: Engine, Storage and Descriptor
RetractorDB | API manual (PL) | API manual (EN)
The embedded Python API executes RQL plans and reads stored results without a running service. It uses the compiled retractordb._core extension, with NumPy output and optional PyTorch integration for notebooks and applications.
Interfaces
| Interface | Purpose | Main entry points |
|---|---|---|
retractordb.Engine |
Compile and execute a plan on a logical timeline inside Python | compile(), step(), run(), rows(), to_numpy(), window() |
retractordb.Storage |
Read existing result storage offline | read(i), storage[i], record_count, descriptor |
retractordb.Descriptor |
Inspect a record schema: fields, types, offsets and record size | Obtain from engine.schema(stream), storage.descriptor or retractordb.load_descriptor(path) |
Engine and Storage support context managers and close(). Descriptor is a sequence of fields, with size_bytes and flat_element_count; it does not open or execute a plan.
The separate retractordb.client.Client monitors a running engine through xqry. See the monitoring API for Python and C++ clients.
Installation and first example
The retractordb package on PyPI includes the embedded extension in compatible binary wheels. Follow the installation guide below for supported Python/platform combinations, an isolated environment and Jupyter or Colab setup. NumPy is required; PyTorch is optional. The standalone CLI/service installation is separate.
For a complete runnable example, including input data, plan execution, NumPy and DLPack, see PL / EN.
Installing pip install ./api/python from the repository installs only the monitoring client and can replace a wheel containing _core. Use the root project's wheel build for embedding, or keep a client-only installation in a separate environment.
Execution and storage contract
Engineadvances logical time without a wall-clock scheduler or IPC publication. Its streams are not visible toxqry.compile()closes the previous plan before compiling the new one; a failed compilation does not restore it. Use a slot budget for plans without an ending input.- Engine inputs belong outside its owned output directory. Use a private temporary directory or an explicit directory satisfying the ownership rules in the manual.
Storageis for offline result files. Opening it can rebuild metadata; it is not a live monitoring interface or a guarantee of filesystem-read-only access.- Records, NumPy arrays and windows copy engine results. DLPack shares the window's CPU array, not the engine buffers.
- Serialize calls on each engine. For PyTorch integration use
DataLoader(num_workers=0). The manual specifies supported devices, errors and process-failure boundaries.
Documentation and notebooks
| Topic | PL | EN |
|---|---|---|
| Install wheels, Python, Jupyter and Colab | Python i Jupyter | Python and Jupyter |
| API, types, ownership, errors and complete example | API Python | Python API |
| Build the extension and wheels | Budowanie | Source build |
| Notebook and Colab validation | Odbiór notebooków | Notebook acceptance |
Local notebooks:
- j0_storage.ipynb: offline storage and descriptors.
- j1_engine.ipynb: execution, NumPy, DLPack and recompilation.
- colab_quickstart.ipynb: wheel installation and optional CPU/CUDA training; follow its wheel and source-revision setup instructions.
See type declarations and Python array/window helpers for implementation details. Repository build and test rules are in CLAUDE.md.
Metadata
Release files for retractordb 0.1.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 10.2 MB
Release files / retractordb-0.1.14-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | retractordb-0.1.14-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
18598ceb7837868be565b18649fa976643a07962a8d5005ffc7e917e4e9eedec
|
|
BLAKE2b-256 checksum How to use checksums |
507e2c39bd2540fb7703a2f140bca5745e3fe48caced6cc0be391a264b944a2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / retractordb-0.1.14-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | retractordb-0.1.14-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
df5dba8f1a86d7db115379f7391de9bc496782a4502aaadd6a5f3b508dc9bba1
|
|
BLAKE2b-256 checksum How to use checksums |
cee592252c0dc3d6bafb703e8969358496feda2a2ac722d88035d725328e7bdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / retractordb-0.1.14-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | retractordb-0.1.14-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7687e6090538b955771428ca4bf2ae179ff1bb8dc37c037ade01631c94861313
|
|
BLAKE2b-256 checksum How to use checksums |
ab9c6b94df2524218c1237241f429988551f54269e966aa10501b3f0895480ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / retractordb-0.1.14-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | retractordb-0.1.14-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
96c1e9d2bbaf60011f5d4354683370f8be2b6cb47c6107ef5ef26740be1e6c8d
|
|
BLAKE2b-256 checksum How to use checksums |
c888985175e55494a955bbca958c8ea653b8ac92297965e510ac815a91c8533a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / retractordb-0.1.14-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | retractordb-0.1.14-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
28b5551b66731e937209262d55ab113ce47c90c48765fd2303e31c4ff99746b7
|
|
BLAKE2b-256 checksum How to use checksums |
144c40d354a702dd40e92fdbca7ebbf5d46c7ecce96efcd37e0a2a1abfbda8dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / retractordb-0.1.14-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | retractordb-0.1.14-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
db750e8ecaa43aec7f4f737ae2a62e8aa8d8a39b1df27d8f2844cf5d19f102b6
|
|
BLAKE2b-256 checksum How to use checksums |
4af05672aecbc89f2a6a5e6607b6830e43ca5bb693f9697c71f6da2bd6175f19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for retractordb 0.1.14
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.