Skip to main content

Reference implementation of the Open Data Contract Standard (ODCS)

Project description

odcs — Rust & Python reference implementation for ODCS

CI Documentation License

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 odcs crate and CLI)
  • Python: 3.9+ (for the pyodcs package)

Rust CLI

cargo install odcs
odcs version

Python

pip install pyodcs
pyodcs version

From source

git clone https://github.com/eddiethedean/odcs.git && cd odcs
cargo build --release
cargo install --path . --locked

# Python editable install
python -m venv .venv && source .venv/bin/activate
pip install maturin pytest
maturin develop --features python --locked

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

odcs validate contract.yaml
# valid

odcs validate contract.yaml --json
odcs inspect contract.yaml
odcs diagnostics contract.yaml

From a repository checkout (includes examples/):

odcs validate examples/minimal.odcs.yaml
cargo run -- validate examples/minimal.odcs.yaml

Rust library

use odcs::{parse, validate, DocumentFormat};

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(yaml, DocumentFormat::Yaml);
let contract = result.into_contract().expect("valid contract");
let report = validate(&contract);
assert!(report.is_valid());

Python

import pyodcs

content = open("contract.yaml", "rb").read()
report = pyodcs.parse_and_validate(content, format="yaml")
assert pyodcs.is_valid(report)

result = pyodcs.parse(content, format="yaml")
print(pyodcs.inspect(result["contract"]))

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.

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

pyodcs-0.4.0.tar.gz (109.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyodcs-0.4.0-cp39-abi3-win_arm64.whl (2.7 MB view details)

Uploaded CPython 3.9+Windows ARM64

pyodcs-0.4.0-cp39-abi3-win_amd64.whl (2.9 MB view details)

Uploaded CPython 3.9+Windows x86-64

pyodcs-0.4.0-cp39-abi3-win32.whl (2.6 MB view details)

Uploaded CPython 3.9+Windows x86

pyodcs-0.4.0-cp39-abi3-musllinux_1_2_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ x86-64

pyodcs-0.4.0-cp39-abi3-musllinux_1_2_i686.whl (3.6 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ i686

pyodcs-0.4.0-cp39-abi3-musllinux_1_2_armv7l.whl (3.4 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARMv7l

pyodcs-0.4.0-cp39-abi3-musllinux_1_2_aarch64.whl (3.4 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

pyodcs-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl (3.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

pyodcs-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

pyodcs-0.4.0-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.4 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ s390x

pyodcs-0.4.0-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (3.8 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ppc64le

pyodcs-0.4.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (3.5 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ i686

pyodcs-0.4.0-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (3.2 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARMv7l

pyodcs-0.4.0-cp39-abi3-macosx_11_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

pyodcs-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file pyodcs-0.4.0.tar.gz.

File metadata

  • Download URL: pyodcs-0.4.0.tar.gz
  • Upload date:
  • Size: 109.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for pyodcs-0.4.0.tar.gz
Algorithm Hash digest
SHA256 644aa0ac4eb09d64704d4d2e709d3f54461355e26c8abe93b72d0fe5f6244fbf
MD5 db9632a5a4b17c1dec7d269ad18b8223
BLAKE2b-256 4409bdd1b5279fa5956a1bd6b38ec73c5a493c166309f693507aef6e02eb7976

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-win_arm64.whl.

File metadata

  • Download URL: pyodcs-0.4.0-cp39-abi3-win_arm64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.9+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 2c558c1c0faa9a339163beeb40bdaeb9030c5537470d66f9ab481ec2b1b6e6a1
MD5 4d1a8ded3098faf9d50d5042cf63fc82
BLAKE2b-256 6cb5b79b520c1b85f7a154134889c4a0c8e9ef3e008fc67c44fb32b8bd5409d2

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: pyodcs-0.4.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 701d12d1f18208c01831cea05fe6931244b54e06c6c943d52583e584a6fab287
MD5 bde4740878591a33c92070ee47a5b0df
BLAKE2b-256 99ea226d9ad5e2381c2f2d2f2d48508dbf330c4d1e1c4c6c9f3ee50f5d8e2dfe

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-win32.whl.

File metadata

  • Download URL: pyodcs-0.4.0-cp39-abi3-win32.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.9+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 99847fc737fe5525e3460e4f3d861b9503ebf26f277be4a6d81ff7443c9ff83f
MD5 fbe7959d95ad6471381c6f50b97b2689
BLAKE2b-256 59913ab07d78d9e717c4828d8d7acda23a3d0f7a7605c445108e82cd43e77b99

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cc220b17f2a2745583fae13994313178c699e67148640333a73c52b950aa4aa6
MD5 6c12632fbc9fa1f2a0d24389fc422801
BLAKE2b-256 da5d412f5532bdc7593076c1b62a2289f293471d51d8b281dedeb23f60b33c15

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 78b10ef8929ad5fab540463b59efb7185cc9275af616b7c2b84f61a5b4a6fab0
MD5 400dc89aa83f7adc00f5e21b4b63178f
BLAKE2b-256 da0783df3a472d8c285899f74457b93fbaf1ed3ed31f845f3e8a1029a56eeb42

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 28d0a479d304c5d8e18bedfa41e88cc0dd500cca7d708ac272c38a5e7a2d60df
MD5 7c03e09c42533dedc90b9f587a6a0170
BLAKE2b-256 ae8e123dc9a8aa330b72a4fee47b8b6ff7c82a06a3ee13aa0faa371607d55c69

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 1fc816b3542c26de08949a2d942fb52827ae89eaebf51c12fd6ae4cca4ae3bf3
MD5 8f7001422e7e75e147955455b5e33977
BLAKE2b-256 900c639c71b9bd9985e0c31c1e69b26a38d929fdd9e065330fd7e4081df0a7d4

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1df864bd19310532571b858f9a1ec2cd76d093b77176e685c02c243d120a6dee
MD5 0260f22efcca9a6cbe00c2bb4097b72c
BLAKE2b-256 41f21cd6c34fd276cf2f5017f816874d048ad8aa7fb0657cc98d5b8cfb2e9d27

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9d2445ebe4bf368ab58a00eca2f682bbff8b4b6031271c16d7bae3e70e3b1b62
MD5 c942fe547eebe2bc615aee1276eea5b4
BLAKE2b-256 fabb2ebe6ba4f5e481bc19687aa4009590ba3b167c3ec641215705d21ea22be0

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 e70fe7160af2a9e7e0190fa092d60f8dc22ccd55c6727136174eadec3ad6e7c3
MD5 780c30cac1d6673d0c54434d7eaf5c2f
BLAKE2b-256 42ddb84578b29e149b8a4c93692bb2d0803f2a2f62fb8bcea3a95239cf7d14c9

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 f39f903cb04730cedfa189cfee58ccc6570db7df8073531b93a427699bb5c80d
MD5 ed0385d7736869c1f6b4766238aff6c5
BLAKE2b-256 9fcac9665ed217f5851dd5dff7ef5ee355bbe34ff3a1148021393b4862b91848

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 24861789813c44c73039da8c11e76ed5e4274d963581a10b2c16088dd66a4904
MD5 cfb2f84364ac039cfdfee6b11f2c6bb0
BLAKE2b-256 d0c03a9d0be9bca44f06f046600f72ffcd7130824ea81d27fb6bc199f408552c

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 9cfb67934fa5d7420e4e20c672299b58be5387cc55442d17da8452c5c8a1f30e
MD5 cff069840ce9e3506b34e2ffeef99bfb
BLAKE2b-256 ae7ddaabd61f32c6acac1e0d8a20125bc1a5dbc3a6eea32dae9acb547080963d

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 592305aba5820bb4f2433ef3fb13682f028f7765da7bc627beef71771d31403c
MD5 f9df00d6ba0c589e2bc39ef389da0b75
BLAKE2b-256 b6c5383956d58e83ecfdede70b724faf2a597e4d7345872be23c44fbaf74dd57

See more details on using hashes here.

File details

Details for the file pyodcs-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pyodcs-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7f5c30f1f7e7a6fc615d790bc55edee4a4538dd498d3bbf3352c7f8c9b0550c7
MD5 6c853bd59661cc6101a1ac27907faaab
BLAKE2b-256 c73da1f5c4564722b81d74840f4bbca1a659fd839c1296bc8cffeadafebc1340

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page