dpcs (Python)
Python bindings for the Data Pipeline Contract Standard (DPCS) Rust reference toolkit. Parse, validate, plan, compare, and bind pipeline contracts from Python via PyO3.
| Package | dpcs on PyPI |
| Toolkit | 0.13.x (ROADMAP reference-implementation release) |
| Spec | 1.0.0-draft |
| Requires | Python ≥ 3.9 (abi3) |
| Guides | dpcs.readthedocs.io |
| Bindings notes | docs/BINDINGS.md |
Install
pip install dpcs
Quick start
from pathlib import Path
import dpcs
source = Path("pipeline.dpcs.yaml").read_text()
report = dpcs.validate_yaml(source)
errors = [d for d in report["diagnostics"] if d.get("severity") == "error"]
assert not errors, errors
print(dpcs.version(), dpcs.dpcs_spec_version())
# or from a path (YAML or JSON):
# report = dpcs.validate_file("pipeline.dpcs.yaml")
API
Functions return JSON-compatible dict / list values (serialized from the
Rust types) unless noted.
| Function | Purpose |
|---|---|
version() / __version__ |
Toolkit version string |
dpcs_spec_version() |
Spec version (1.0.0-draft) |
parse_yaml_str(source) / parse_json_str(source) |
Parse a contract document |
validate_yaml(source) / validate_file(path) |
Validate YAML/JSON (file auto-detects) |
plan_yaml(source) |
Build a pipeline plan (or validation report on refusal) |
evaluate_capabilities(profile_yaml, contract_yaml) |
Check orchestrator capabilities |
bind_yaml(contract_yaml, profile_yaml, target) |
Emit scaffolding (airflow, dagster, prefect, temporal, kubernetes, …) |
compare_contract_yaml(baseline, candidate) |
Compatibility comparison |
validate_registry_yaml(source) |
Validate an artifact registry document |
validate_conformance_profile_yaml(source) |
Validate a conformance profile |
to_yaml_str(contract_json) / to_json_str(contract_yaml) |
Format conversion |
CLI, report formats, and TUI are Rust-first (dpcs-cli); this package wraps the
core library entry points. Full toolkit docs:
dpcs.readthedocs.io.
Develop from source
Requires a virtualenv for maturin develop. The Python crate sits outside the
Cargo workspace (workspace.exclude).
cd bindings/python
python -m venv .venv && source .venv/bin/activate
pip install maturin pytest
maturin develop
pytest -q
License
Apache-2.0 OR MIT — same as the main dpcs repository.
Release files for dpcs 0.13.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 | |
|---|---|---|---|
| dpcs-0.13.1.tar.gz | 150.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dpcs-0.13.1-cp39-abi3-manylinux_2_34_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.34+ x86-64 | Details |
Total release size: 1.4 MB
Release files / dpcs-0.13.1.tar.gz
| Download URL | dpcs-0.13.1.tar.gz |
|---|---|
| Size | 150.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
055bc2f1bb6fbce37c268d773deec2db926dd63a6cf367979532131ac47493e5
|
|
BLAKE2b-256 checksum How to use checksums |
352ca8d9cbb6e58548977ca3a73a402e23a34825ae97384811c2628782b18650
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / dpcs-0.13.1-cp39-abi3-manylinux_2_34_x86_64.whl
| Download URL | dpcs-0.13.1-cp39-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.9 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8cdc3a0608187810815d1acfc705799dceb7717afaac34d61f3e9b41954fcad7
|
|
BLAKE2b-256 checksum How to use checksums |
8d1101ac91e392e2649167e71d8f8589d10a502d34df31d00ef91042a322224d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|