datacontract-cli
The datacontract CLI is an open source command-line tool for working with Data Contracts. It uses data contract YAML files to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
Decision gist · record as of 2026-08-14
Yes, if you work with data products or need formal data governance. The tool is actively maintained, has no known vulnerabilities, and solves a real problem in data engineering. Install friction is low. The main consideration is whether your data sources are among the supported platforms and whether you need the full dependency tree; if you only lint YAML contracts without testing live data, the overhead is lighter.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later (supports up to 3.14).
- Testing against live databases requires appropriate credentials and network access to the target data source.
- Low friction install with a pure Python wheel.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, making it suitable for enterprise data engineering workflows without licensing concerns.
last release 2026-08-14 (0 days) · last repo commit 2026-08-14 · 1,036 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,479,387 downloads/mo, #3,854 on PyPI
Alternatives
Verify before relying
# Install
pip install datacontract-cli
# Test a data contract
export DATACONTRACT_POSTGRES_USERNAME=user
export DATACONTRACT_POSTGRES_PASSWORD=pass
datacontract test https://datacontract.com/orders-v1.odcs.yaml
# Export to SQL
datacontract export sql https://datacontract.com/orders-v1.odcs.yaml- Whether the package can be used as a Python library directly or if CLI invocation is the primary interface
- Performance characteristics when testing large datasets or complex schemas
- Extent of custom export and import capabilities mentioned in the documentation
What it is and what it does
The datacontract CLI is a command-line tool for managing data contracts—formal specifications that define the structure, quality, and freshness expectations of data products. It reads contract definitions in YAML format (following the Open Data Contract Standard) and validates that actual data in databases matches those specifications by running schema checks, quality assertions, and freshness tests. The tool connects to multiple data platforms and can generate outputs in SQL DDL, HTML, and other formats.
You use it to catch data quality issues early, document data products formally, enforce contracts in CI/CD pipelines, and detect breaking changes between contract versions. It ships with 21 runtime dependencies covering YAML parsing via pyyaml and ruamel.yaml, JSON schema validation via fastjsonschema and jsonschema, cloud SDKs like boto3, and templating via Jinja2 and jinja_partials, so it's a fairly complete toolkit rather than a lightweight utility.
Use it for
- Validate that a database table conforms to a published data contract before consuming it downstream
- Generate SQL DDL from a data contract YAML to keep schema definitions in sync
- Run schema and quality checks in a CI/CD pipeline whenever a data product is updated
- Import an existing database table into a contract definition to establish a baseline contract
- Detect breaking changes between two versions of a data contract and report them
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with data products or need formal data governance.
The tool is actively maintained, has no known vulnerabilities, and solves a real problem in data engineering. Install friction is low. The main consideration is whether your data sources are among the supported platforms and whether you need the full dependency tree; if you only lint YAML contracts without testing live data, the overhead is lighter.
Install
datacontract-cli on PyPI
Before you install
Low friction install with a pure Python wheel. Active maintenance with a recent release (2026-08-14) and 1036 repository stars. Supports Python 3.10 through 3.14, though the 21 runtime dependencies (including pydantic, sqlglot, boto3, and Jinja2) mean initial installation pulls a substantial dependency tree.
Requires Python 3.10 or later (supports up to 3.14). Testing against live databases requires appropriate credentials and network access to the target data source.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for enterprise data engineering workflows without licensing concerns.
Quickstart
# Install
pip install datacontract-cli
# Test a data contract
export DATACONTRACT_POSTGRES_USERNAME=user
export DATACONTRACT_POSTGRES_PASSWORD=pass
datacontract test https://datacontract.com/orders-v1.odcs.yaml
# Export to SQL
datacontract export sql https://datacontract.com/orders-v1.odcs.yaml
Verify before relying
- Whether the package can be used as a Python library directly or if CLI invocation is the primary interface
- Performance characteristics when testing large datasets or complex schemas
- Extent of custom export and import capabilities mentioned in the documentation
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <3.15,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 21 packagestyperclickpydanticpydantic-settingspyyamlruamel.yamlrequeststruststorefastjsonschemajsonschemapytzpython-multipartrichsqlglotpython-dotenvboto3Jinja2jinja_partialsdatacontract-specificationopen-data-contract-standarddeepdiff |
| Maintenance | Actively maintained 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,479,387 / month, #3,854 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Information TechnologyOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: DatabaseTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: Testing |
Evidence: datacontract_cli-1.1.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “data contract validation CLI”
- datacontract-cliA CLI tool for defining, validating, and testing data contracts using…
- open-data-contract-standardReads and writes YAML files conforming to the Open Data Contract…
- flexValidates Swagger 2.0 API specifications against JSON Schema and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also datacontract-specification · open-data-contract-standard · snowflake-cli · dbt-core · dbt-osmosis · sqlmesh · elementary-data · squawk-cli · shandy-sqlfmt · acryl-datahub