Python bindings for the Data Pipeline Contract Standard (DPCS) reference toolkit
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dpcs-0.13.0.tar.gz.
File metadata
- Download URL: dpcs-0.13.0.tar.gz
- Upload date:
- Size: 147.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d376675f7001f45f1572f597b73d3d8e288bff98e5b4dc04f2eda7061ed38504
|
|
| MD5 |
dddb173f67f655048eb852f57af6d3eb
|
|
| BLAKE2b-256 |
4a641453e97ded9990e8e323847e9b4dd14379624f564fa6f9e1d75fb6240a92
|
File details
Details for the file dpcs-0.13.0-cp39-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: dpcs-0.13.0-cp39-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
226f29f837b8abd44252d245abb35426daea5516ba1214bf669dea212bb509f5
|
|
| MD5 |
a65b9d77431623b992fbbea6d9c5ccfa
|
|
| BLAKE2b-256 |
49506dba90c0d4e8935d7cb45e135ac4e5392a8e4f863a36d672dfde69f58ee4
|