Open Data Contract Standard (Python)
The pip module open-data-contract-standard to read and write YAML files using the Open Data Contract Standard. The pip module was extracted from the Data Contract CLI, which is its primary user.
The version number of the pip module corresponds to the version of the Open Data Contract Standard it supports.
Version Mapping
| Open Data Contract Standard Version | Pip Module Version |
|---|---|
| 3.0.1 | >=3.0.1 |
| 3.0.2 | >=3.0.4 |
| 3.1.0 | >=3.1.0 |
| 3.2.0 | >=3.2.0 |
Note: We mirror major and minor version from the ODCS to the pip module, but not the patch version!
Installation
pip install open-data-contract-standard
Usage
from open_data_contract_standard.model import OpenDataContractStandard
# Load a data contract specification from a file
data_contract = OpenDataContractStandard.from_file('path/to/your/data_contract.yaml')
# Print the data contract specification as a YAML string
print(data_contract.to_yaml())
from open_data_contract_standard.model import OpenDataContractStandard
# Load a data contract specification from a string
data_contract_str = """
version: 1.0.0
kind: DataContract
id: 53581432-6c55-4ba2-a65f-72344a91553b
status: active
name: my_table
apiVersion: v3.2.0
"""
data_contract = OpenDataContractStandard.from_string(data_contract_str)
# Print the data contract specification as a YAML string
print(data_contract.to_yaml())
Development
uv sync --all-extras
Release
- Change version number in
pyproject.toml - Run
./releasein your command line - Wait for the releases on GitHub, PyPi and PyPi (test)
Metadata
Release files for open-data-contract-standard 3.2.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 | Provenance | Actions |
|---|---|---|---|---|
| open_data_contract_standard-3.2.0.tar.gz | 26.9 kB | With provenance | Details for open_data_contract_standard-3.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| open_data_contract_standard-3.2.0-py3-none-any.whl | Python 3 | none | any | Details for open_data_contract_standard-3.2.0-py3-none-any.whl |
Total release size: 47.8 kB
Release files / open_data_contract_standard-3.2.0.tar.gz
| Download URL | open_data_contract_standard-3.2.0.tar.gz |
|---|---|
| Size | 26.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
37589b1e98ea519de51366e0efc2e02dbc87e1da68f07fd9385e49ab5df76763
|
|
BLAKE2b-256 checksum How to use checksums |
015d11fcaf438c29e66d3f3eb40fa8e10fb53930f6346bce323624e139e0e301
|
| 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 2, 2026.
Transparency logRelease files / open_data_contract_standard-3.2.0-py3-none-any.whl
| Download URL | open_data_contract_standard-3.2.0-py3-none-any.whl |
|---|---|
| Size | 20.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a7e05dfc52b94a77b54f81a9033dd7a718133cf37bf66f3eb7d0eefd2fd33d4f
|
|
BLAKE2b-256 checksum How to use checksums |
9b3a8b7eacd298d76cc4777c9195f43d744a55bfda84060fd1c33fe8431fe6ea
|
| 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 2, 2026.
Transparency logSecurity for open-data-contract-standard 3.2.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for open_data_contract_standard-3.2.0.tar.gz
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 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.