odcs — Rust & Python reference implementation for ODCS
Validate Open Data Contract Standard (ODCS) documents — machine-readable contracts that describe datasets (schemas, quality rules, SLAs, ownership, and server metadata) — with a deterministic parser, validator, and CLI.
This tool checks that your contract document is well-formed and conforms to ODCS v3.1.0. It does not execute quality checks against live data.
Use this repository if you want to:
- validate ODCS v3.1.0 contracts in CI/CD
- parse contracts into a typed object model (Rust or Python)
- get structured diagnostics with stable
odcs:*error codes
Status: Alpha pre-1.0 (0.4.0) — schema-complete default validation for ODCS v3.1.0; see ROADMAP.md and the documentation.
This repository implements the standard; it is not the ODCS specification itself.
| Upstream ODCS | 3.1.0 |
| Rust crate | odcs |
| Python package | pyodcs |
| Documentation | odcs.readthedocs.io |
| Rust API docs | docs.rs/odcs |
Installation
Prerequisites
- Rust: 1.75+ (for the
odcscrate and CLI) - Python: 3.9+ (for the
pyodcspackage)
Rust CLI
Python
From source
&&
# Python editable install
&&
See the installation guide (source) for troubleshooting.
Quick start
Save a minimal contract as contract.yaml:
version: "1.0.0"
apiVersion: "v3.1.0"
kind: "DataContract"
id: "hello-contract"
status: "draft"
schema:
- name: customers
properties:
- name: customer_id
logicalType: string
required: true
Rust CLI
# valid
From a repository checkout (includes examples/):
Rust library
use ;
let yaml = br#"
version: "1.0.0"
apiVersion: "v3.1.0"
kind: "DataContract"
id: "hello-contract"
status: "draft"
schema:
- name: customers
properties:
- name: customer_id
logicalType: string
required: true
"#;
let result = parse;
let contract = result.into_contract.expect;
let report = validate;
assert!;
Python
=
=
assert
=
Documentation
Full docs: odcs.readthedocs.io
| I want to… | Read |
|---|---|
| Get started in 5 minutes | Getting started · source |
| Install Rust or Python | Installation · source |
| Use the CLI | CLI · source |
| Use from Rust | Rust · source |
| Use from Python | Python · source |
| Author a contract | Authoring · source |
| Integrate in CI/CD | CI/CD · source |
| Understand error codes | Diagnostics · source |
| Upgrade between versions | Migration · source |
| Browse examples | Examples · source |
| Contribute | Contributing · source |
| Report a security issue | SECURITY.md |
| Implementation guides | Implementation · source |
| Rust API reference | docs.rs/odcs |
Pipeline
ODCS Document → Parser → Canonical Object Model → Validator → Diagnostics
Execution, pipeline composition, and transformation semantics are out of scope. See non-goals (source).
Ecosystem
ODCS defines what data is.
DTCS defines how data changes.
DPCS defines how transformations compose.
See Relationship to DTCS (source).
Repository layout
odcs/
├── docs/user/ # User guides (install, CLI, Rust, Python, diagnostics)
├── docs/implementation/ # Maintainer / implementation guides
├── examples/ # Sample data contracts
├── python/pyodcs/ # Python package source
├── src/ # Rust library and CLI
└── tests/fixtures/ # Integration test fixtures
Contributing
See CONTRIBUTING.md. When implementation guidance conflicts with the upstream ODCS specification, the upstream specification wins.
License
Apache License 2.0. See LICENSE.