--- id: datacontract-specification version: "1.2.3" license: unclear license_treatment: permissive maintenance: aging --- # datacontract-specification — The Pydantic Model of the Data Contract Specification License: permissive · Maintenance: aging · Downloads: 1.3M/mo ## What it is and what it does This package provides a Pydantic-based Python model for the Data Contract Specification, allowing you to load and serialize data contract YAML files programmatically. It was extracted from the Data Contract CLI as a standalone library and mirrors the major and minor version numbers of the specification it supports (1.2.x for spec 1.2.0). The package requires Python 3.10 or later and depends only on pydantic and pyyaml. You use it to parse existing data contract YAML files into Python objects via from_file() or from_string(), inspect and manipulate the contract structure, and serialize it back to YAML. It's designed as a low-level serialization layer rather than a full data governance platform. Use it for: - Parse and validate data contract YAML files in Python applications that need to read contract metadata. - Generate or modify data contract definitions programmatically before writing them back to YAML. - Integrate data contract specifications into data pipeline orchestration or metadata management tools. - Build tooling that needs to inspect contract structure without external CLI calls. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reads and writes YAML files conforming to the Data Contract Specification using Pydantic models, enabling programmatic access to data contract definitions. Yes, if you need programmatic access to Data Contract Specification files in Python. The low install friction, permissive license, and small dependency footprint make it a reasonable choice. However, the aging maintenance status (323 days since last release) suggests checking whether the package is still actively developed before adopting it for critical workflows. ## Install pip install datacontract-specification uv add datacontract-specification poetry add datacontract-specification ## Installing datacontract-specification Before you install: Low install friction with only two runtime dependencies (pydantic and pyyaml). Maintenance status is aging—last release was 323 days ago—but the repository remains active with a recent commit on 2025-09-25. License in practice: MIT license (permissive) allows commercial and private use with minimal restrictions, making it suitable for most projects. Quickstart: pip install datacontract-specification from datacontract_specification.model import DataContractSpecification data_contract = DataContractSpecification.from_file('path/to/your/data_contract.yaml') print(data_contract.to_yaml()) Requires Python 3.10 or later. Verify before relying: - Whether the package is actively maintained beyond the most recent commit or if 323 days since release indicates stalled development. - Whether version 1.2.3 fully supports all features of Data Contract Specification 1.2.0 or if there are known limitations. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags data contract yaml parser, datacontract specification python, read write data contracts, pydantic data contract model, yaml data contract loader, data-contracts, yaml-serialization [View on SkillFed](https://skillfed.io/packages/datacontract-specification) · [View on PyPI](https://pypi.org/project/datacontract-specification/)