dataioc
Declarative data dependency graphs for Python.
Each DataDescriptor names a quantity and defines how it is derived from its direct dependencies. DataIoC composes these local rules into a graph, then resolves and caches only the subgraph required by the result you request. Bind a provider to any quantity to replace that part of the graph without changing downstream calculations.
English | 简体中文 | Documentation | PyPI
Example
The raw readings 10, 20, and 60 represent measurements of 1, 2, and 6.
from dataioc import DataDescriptor, DataIoC
class RawReadings(DataDescriptor):
pass
class Measurements(DataDescriptor):
def __build__(self, data):
return tuple(value / 10 for value in data[RawReadings])
class Statistics(DataDescriptor):
def __build__(self, data):
values = data[Measurements]
return sum(values) / len(values), max(values)
class Report(DataDescriptor):
def __build__(self, data):
mean, peak = data[Statistics]
return f"mean={mean:g}, peak={peak:g}"
data = DataIoC().add(RawReadings, (10, 20, 60))
assert data[Report] == "mean=3, peak=6"
assert data[Measurements] is data[Measurements]
data[Report] is the only request the caller has to make. The container follows the dependencies and caches each value it builds.
To use recorded measurements instead, bind a provider for Measurements:
recorded = DataIoC().add_provider(Measurements, lambda _: (1.0, 2.0, 6.0))
assert recorded[Report] == "mean=3, peak=6"
RawReadings is no longer needed; Statistics and Report stay as they are.
When it helps
If both the inputs and the calculation path are fixed, ordinary function calls are simpler. Use dataioc when the relationships stay stable but a value may come from live measurements, recorded data, a simulation, or an estimate.
dataioc grew out of deinterf. In its direction-cosine example, the same compensation terms work whether direction cosines are derived from magnetic-vector measurements or supplied by an INS estimate. dvmss applies the pattern to simulation: supply the inputs, request Tmi, and let the container resolve the intermediate quantities.
Scope
dataioc resolves data dependencies synchronously in the current process; it is not a workflow scheduler. Use a fresh container for each dataset or provider configuration. See Core concepts for caching, diagnostics, and other runtime limits.
Install
python -m pip install dataioc
python -m pip install "dataioc[numpy]"
Documentation
- Quickstart: build a result from local dependency rules.
- Core concepts: understand descriptors, builders, caching, and failure behavior.
- Providers: bind a quantity to another source or derivation.
- Indexed data: reuse one model across related data groups.
- NumPy: use array subclasses.
- API: look up interfaces.
Contributors
yanang007 wrote the original container. dyuu7 shaped the design, extracted it into dataioc, and maintains the project.
Licensed under the MIT License.
Release files for dataioc 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dataioc-0.1.0.tar.gz | 102.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dataioc-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 115.4 kB
Release files / dataioc-0.1.0.tar.gz
| Download URL | dataioc-0.1.0.tar.gz |
|---|---|
| Size | 102.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d75ad521ed9d7bcce542187b3a01d54b6eb57dde65557adfe1c00de505152def
|
|
BLAKE2b-256 checksum How to use checksums |
8c297b66fe12b9dc340cf40dcd8842fd1e777afd72a459f672efa5f2e228bdcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logRelease files / dataioc-0.1.0-py3-none-any.whl
| Download URL | dataioc-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7bc0353dbe6ea5c5382c04f19df5ea06e2bd63542d5163abc4c78a8ce177ab2
|
|
BLAKE2b-256 checksum How to use checksums |
41988e897c29f9e2455593cd4fcdd39e896c785efb6213c2c7d52a13f05dcbfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency log