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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dqflow-0.1.1.tar.gz.
File metadata
- Download URL: dqflow-0.1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56cd3c4de9c2d31beca6365b4afe78eeacc77a9fae999d049616ba76864a3225
|
|
| MD5 |
2e6029aa3acc7f0e7cb2fd5ae5c7b8fb
|
|
| BLAKE2b-256 |
899c88977097856a9eac757531aa9f319ed27dc302affda2d4950fbe41364b43
|
File details
Details for the file dqflow-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dqflow-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a9d247ebb8d3bbef0d7b65f788b55442514110631711653c094398ecbfcd69d
|
|
| MD5 |
5c36c6b3e214710cddcff9c1d87c9170
|
|
| BLAKE2b-256 |
08c5ef93a25c38566659fc8514aca6a4663ff51b1931b2e8b71d8f1142a805ab
|