Skip to main content

Lightweight, contract-first data quality engine for modern data pipelines

Project description

dqflow

dqflow is a lightweight, contract-first data quality engine for modern data pipelines.

Define explicit expectations for your data (schema, validity, freshness) and fail fast when data breaks — before bad data reaches downstream systems.


Why dqflow?

Data quality issues are inevitable — silent failures are not.

Most teams rely on ad-hoc checks, fragile assertions, or heavyweight frameworks that are hard to maintain. dqflow takes a different approach:

  • Contracts over checks — expectations are explicit and versionable
  • Pipeline-first — designed for ETL, ELT, and streaming workflows
  • Lightweight & Pythonic — minimal API, easy to embed
  • Fail fast — break pipelines intentionally, not silently

Quick example

from dqflow import Contract, Column

orders = Contract(
    name="orders",
    columns={
        "order_id": Column(str, not_null=True),
        "amount": Column(float, min=0),
        "currency": Column(str, allowed=["USD", "EUR"]),
        "created_at": Column("timestamp", freshness_minutes=60),
    },
    rules=[
        "row_count > 1000",
        "null_rate(amount) < 0.01",
    ],
)

result = orders.validate(df)

if not result.ok:
    raise Exception(result.summary())

Features (v0.1 scope)

  • Contract-as-code (Python & YAML)

  • Column-level checks

    • type validation
    • not null
    • min / max
    • allowed values
  • Table-level checks

    • row count
    • freshness
  • Structured validation results (JSON-friendly)

  • Pandas engine

  • CLI support


CLI usage

dq validate contracts/orders.yaml data/orders.parquet

Supported engines

  • ✅ Pandas
  • 🚧 PySpark (planned)
  • 🚧 SQL tables (planned)

Philosophy

  • Explicit is better than implicit
  • Bad data should break pipelines early
  • Quality rules are part of your system design

dqflow is not a full data observability platform. It is a small, opinionated library meant to be embedded directly into pipelines.


Roadmap

  • PySpark engine
  • dbt / dlt integrations
  • Incremental & backfill-aware validation
  • Metrics export (Prometheus-compatible)

License

MIT


Status

🚧 Early development (v0.1.0)

APIs may change. Feedback and contributions are welcome.

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

dqflow-0.1.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

dqflow-0.1.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file dqflow-0.1.0.tar.gz.

File metadata

  • Download URL: dqflow-0.1.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for dqflow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7df5118635ea38bd303122107bd0217627b93c508a1f7aee1ffe79eb3fd1ddef
MD5 ffd8fd6ff343985a7a0955c29edcc40d
BLAKE2b-256 ae49b93f00156849e286e7491543403a30294fae745dbf517029c0fbdc44d3cf

See more details on using hashes here.

File details

Details for the file dqflow-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dqflow-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for dqflow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d367e4a806a607b7c536fa4e5d792af507411e2ec1f97cbc08b15c37e13da912
MD5 eb0e7b7922940386a0389f9b7a4f4bb1
BLAKE2b-256 8601a159e3547b314631774c860488765e3c1f25d23f90fd86a2e15755b7c6f9

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