Skip to main content

Developer-first data quality engine

Project description

Kontra

Data quality validation for developers.

Kontra validates datasets against declarative contracts. Define rules in YAML, run them against Parquet, CSV, PostgreSQL, SQL Server, S3, or Azure. Get violation counts back.

pip install kontra

30-Second Example

# Profile your data
kontra profile data.parquet

# Draft a starting contract
kontra profile data.parquet --draft > contract.yml

# Validate
kontra validate contract.yml

Output:

PASSED - data.parquet (4 rules)
  COL:user_id:not_null      ✓
  COL:email:unique          ✓
  COL:status:allowed_values ✓
  COL:age:range             ✓

What You Write

# contract.yml
name: users_quality
datasource: data/users.parquet

rules:
  - name: not_null
    params: { column: user_id }

  - name: unique
    params: { column: email }

  - name: allowed_values
    params:
      column: status
      values: [active, inactive, pending]

What You Get

  • 18 built-in rules: not_null, unique, range, regex, contains, length, freshness, and more
  • Fast execution: Metadata analysis and SQL pushdown before loading data
  • Multiple sources: Parquet, CSV, PostgreSQL, SQL Server, S3, Azure ADLS
  • Python API: Use as a library with kontra.validate(df, rules=[...])
  • State tracking: Compare runs over time with kontra diff

Documentation

Doc Audience
Getting Started New users
Python API Library users
Rules Reference Everyone
Configuration Project setup
Advanced Topics Agents, state, execution model
Architecture Contributors

License

MIT

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

kontra-0.5.4.tar.gz (336.5 kB view details)

Uploaded Source

Built Distribution

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

kontra-0.5.4-py3-none-any.whl (303.7 kB view details)

Uploaded Python 3

File details

Details for the file kontra-0.5.4.tar.gz.

File metadata

  • Download URL: kontra-0.5.4.tar.gz
  • Upload date:
  • Size: 336.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for kontra-0.5.4.tar.gz
Algorithm Hash digest
SHA256 2f867f3087f93e5ede714e23e30744401ec039dd11ff434f3b79768f0fc57daa
MD5 f98e4dac4c39dbfb0a7c234a5afc1f0a
BLAKE2b-256 691203431ed689e71926d1250a8fbda43b99c861e43db472182dfc8b029b0a1d

See more details on using hashes here.

File details

Details for the file kontra-0.5.4-py3-none-any.whl.

File metadata

  • Download URL: kontra-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 303.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for kontra-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3c1ec3e0c2723491d6d3d7f3f7391c93dd4a945c0a7e1f56a8969514f89be63e
MD5 e52a144abdc69da82fb8c33545a8be1a
BLAKE2b-256 11298118c0e1f5eeffbd561f7b2f6181108f1f2cec0928704f821afeef011064

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