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.3.tar.gz (330.4 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.3-py3-none-any.whl (297.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kontra-0.5.3.tar.gz
  • Upload date:
  • Size: 330.4 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.3.tar.gz
Algorithm Hash digest
SHA256 532668c749d89a5d427d5a9cb6e187441ca32468be4c73080eefe2d3d1111607
MD5 27a84ad0554c8658f85902c411f5476c
BLAKE2b-256 004e3f05ce884f941011b3791e8fd988d031f9d80fbe3cad6d7151bae7b0fc75

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kontra-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 297.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 319944d447fb6f7671a89620b809f6ea407487dc941cbf1d9fa637a97a0a9d95
MD5 6d13a8127e581cadd1e0b444732f54c4
BLAKE2b-256 cfd57fb1ff6d06338d55f99d41dc3e39c1f6752f5dfe61c01ed151773ad564aa

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