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
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
data_contract = OpenDataContractStandard.from_file('path/to/your/data_contract.yaml')
print(data_contract.to_yaml())
from open_data_contract_standard.model import OpenDataContractStandard
data_contract_str = """
version: 1.0.0
kind: DataContract
id: 53581432-6c55-4ba2-a65f-72344a91553b
status: active
name: my_table
dataProduct: my_quantum
apiVersion: v3.0.1
"""
data_contract = OpenDataContractStandard.from_string(data_contract_str)
print(data_contract.to_yaml())
Development
uv sync --all-extras
Release
- Change version number in
pyproject.toml
- Run
./release
in your command line
- Wait for the releases on GitHub, PyPi and PyPi (test)