| Quickstart | Rules | Contracts | MCP | API | Security | FAQ |
|---|
"Trust is easier to build than to repair." That is why OpenDQV exists. A rejection at the point of write is cheaper than a data incident three weeks later.
Beta (v3.x). REST endpoints, MCP tool names and Python SDK signatures are stable. Rule verdicts are being aligned with OpenDQV Cloud's managed engine, so a release can change how a rule judges a record — every such change is listed in the CHANGELOG. Security fixes ship in the latest release. See API Stability for the details.
OpenDQV Core is an open-source, self-hosted write-time data validation service. Source systems call it before writing data. Every answer is an HTTP 200: a bad record comes back valid: false with per-field errors and the caller refuses the write; a good record comes back valid: true and the write goes ahead. No payload is stored.
Prefer a managed service? See OpenDQV Cloud (managed).
flowchart LR
subgraph Callers
direction TB
SF[Salesforce]
SAP[SAP]
DYN[Dynamics]
ORA[Oracle]
WEB[Web forms]
ETL1[ETL pipelines]
DJ[Django clean]
PY[Python scripts]
PD[Pandas / ETL]
CD[Claude Desktop]
CUR[Cursor]
LLM[LLM agents]
end
subgraph CORE["OpenDQV Core"]
direction TB
API[Validation API\nREST / batch]
SDK[LocalValidator\nin-process SDK]
MCP[MCP Server\nAI-native]
API & SDK & MCP --> CON[Contracts · YAML\nGovernance · RBAC\nAudit trail]
API & SDK & MCP --> GEN[Code Generator\nApex · JS · SQL]
end
subgraph Results
direction TB
R1[valid: true / false]
R2[per-field errors]
R3[severity levels]
R4[webhooks on events]
end
SF & SAP & DYN & ORA & WEB & ETL1 --> API
DJ & PY & PD --> SDK
CD & CUR & LLM --> MCP
API & SDK & MCP --> R1
subgraph Importers
IMP[dbt schema · GX suites\nSoda checks · ODCS · CSV]
end
IMP --> CON
style API fill:#0d3b5e,stroke:#092a44,color:#fff
style SDK fill:#0d3b5e,stroke:#092a44,color:#fff
style MCP fill:#0d3b5e,stroke:#092a44,color:#fff
style CON fill:#1a8aad,stroke:#14708d,color:#fff
style GEN fill:#1a8aad,stroke:#14708d,color:#fff
style R1 fill:#2ec4e6,stroke:#1a8aad,color:#0d3b5e
style R2 fill:#2ec4e6,stroke:#1a8aad,color:#0d3b5e
style R3 fill:#2ec4e6,stroke:#1a8aad,color:#0d3b5e
style R4 fill:#2ec4e6,stroke:#1a8aad,color:#0d3b5e
style IMP fill:#1a8aad,stroke:#14708d,color:#fff
A rejection at the point of write closes the feedback loop — producers see failures immediately and fix them at source. Rejection rates drop over time because the tool changes the incentive, not just the outcome.
For post-landing monitoring use Great Expectations, Soda, or dbt tests — they're complementary, not competing. OpenDQV Core owns layer one (write-time enforcement); those tools own layer three (post-ingestion observability).
AI Agents — first-class via MCP
OpenDQV Core ships a built-in Model Context Protocol server, so Claude Desktop, Cursor, and any other MCP-compatible agent can discover contracts, validate records, and explain failures through tool calls the agent explicitly declares — no hallucinated compliance, no invented rules.
4-minute demo: Claude Desktop uses two MCP servers — OpenDQV Core for validation, Marmot for catalog lineage — to check a menu item against ppds_menu_item for Natasha's Law allergen compliance, stating which tool calls it makes and why. (Backup: download the MP4 from the repo)
For tool reference, write guardrails, remote mode, and the Marmot composition pattern, see docs/mcp.md.
Reserved agent_id prefix. The prefix OpenDQV_SA_ is reserved for OpenDQV-owned system traffic — smoke probes, demos, MCP self-tests, perf harnesses. The pattern is OpenDQV_SA_[Category]_[Scope] (e.g. OpenDQV_SA_smoke_v240, OpenDQV_SA_probe_persona_b). Core's metrics endpoints (/api/v1/stats, /api/v1/agents, MCP get_quality_metrics, MCP list_agents) suppress these by default so your quality metrics stay clean of dev/test traffic. Pass include_system=true to surface them for diagnostics — each row carries an is_system_agent flag.
Install
| I have... | Command |
|---|---|
| Python 3.11+ | git clone https://github.com/OpenDQV/OpenDQV.git && cd OpenDQV && bash install.sh |
| Docker | git clone https://github.com/OpenDQV/OpenDQV.git && cd OpenDQV && cp .env.example .env && docker compose up -d |
| Just the SDK/CLI | pip install opendqv then opendqv init to bootstrap contracts |
| None of the above | Beginner setup guide → |
install.sh creates a virtual environment, installs dependencies, and launches the onboarding wizard. Docker pulls ghcr.io/opendqv/opendqv:latest — no build step required.
⚠️
AUTH_MODE=open(the default) has no authentication. SetAUTH_MODE=tokenand a strongSECRET_KEYin.envbefore any non-local deployment. See SECURITY.md.
OpenDQV Cloud (managed)
OpenDQV Cloud (managed). Prefer not to run it yourself? OpenDQV Cloud runs the same contract format as a managed service on AWS, Azure or Google Cloud, in the UK, EU or US. 14-day trial, no card: https://opendqv.com. OpenDQV Core stays open source (MIT) and runs without it.
Your First Validation
1. Write a contract — drop a YAML file in your contracts directory (run opendqv init --all to copy every bundled contract, or opendqv init for a single starter):
name: order
version: "1.0"
owner: "Data Governance"
status: active
rules:
- name: valid_email
type: regex
field: email
pattern: "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"
severity: error
error_message: "Invalid email format"
- name: amount_positive
type: min
field: amount
min: 0.01
severity: error
error_message: "Order amount must be positive"
- name: status_valid
type: allowed_values
field: status
allowed_values: [pending, confirmed, shipped, cancelled]
severity: error
error_message: "Invalid order status"
2. Reload contracts:
curl -X POST http://localhost:8000/api/v1/contracts/reload
3. Send a bad record — OpenDQV Core rejects it:
curl -s -X POST http://localhost:8000/api/v1/validate \
-H "Content-Type: application/json" \
-d '{"contract": "order", "record": {"email": "not-an-email", "amount": -5, "status": "unknown"}}'
{
"valid": false,
"errors": [
{"field": "email", "rule": "valid_email", "message": "Invalid email format", "severity": "error", "error_code": "OPENDQV_REGEX_VALID_EMAIL"},
{"field": "amount", "rule": "amount_positive", "message": "Order amount must be positive", "severity": "error", "error_code": "OPENDQV_MIN_AMOUNT_POSITIVE"},
{"field": "status", "rule": "status_valid", "message": "Invalid order status", "severity": "error", "error_code": "OPENDQV_ALLOWED_VALUES_STATUS_VALID"}
],
"contract": "order",
"version": "1.0"
}
(Abridged — the real response also carries contract_hash, engine_version, validated_at, and per-error suggested_fix.)
4. Fix the record — it passes:
curl -s -X POST http://localhost:8000/api/v1/validate \
-H "Content-Type: application/json" \
-d '{"contract": "order", "record": {"email": "alice@example.com", "amount": 49.99, "status": "pending"}}'
{"valid": true, "errors": [], "warnings": [], "contract": "order", "version": "1.0"}
The customer contract ships pre-seeded if you want to skip step 1. The quickstart guide walks through authoring, lifecycle, and batch validation.
Rules
| Type | What it checks |
|---|---|
not_empty |
Field is present and non-empty |
not_empty_string |
Field is present, a string, and non-empty (non-strings rejected as a type mismatch) |
regex |
Field matches (or does not match) a pattern. Built-ins: builtin:email, builtin:uuid, builtin:ipv4, builtin:url |
min / max / range |
Numeric bounds |
min_length / max_length |
String length |
min_age / max_age |
Keys on a date_format rule (or any rule), not rule types: age derived from the date within bounds; a present value that cannot be read as a date fails |
date_format |
ISO 8601 date/datetime, or exactly the declared fixed-width format (%d/%m/%Y, DD/MM/YYYY) |
allowed_values |
Value must be in a fixed list |
forbidden_values |
Value must not be in a fixed list — placeholder junk (N/A, test@test.com) |
lookup |
Value must appear in a local file or HTTP endpoint (with TTL cache) |
compare |
Cross-field: field op compare_to — supports gt, lt, gte, lte, eq, neq, same_date, and today/now sentinels |
required_if / forbidden_if |
Conditional: required or forbidden when another field equals a value |
conditional_value |
Field must hold a given value when another field holds a given value |
checksum |
Check-digit integrity: IBAN, GTIN/GS1, NHS, ISIN, LEI, VIN, CPF, Luhn, FIGI, Verhoeff (ISRC: structural check) |
unique |
No duplicates within a batch (batch mode only) |
cross_field_range |
Value must be between two other fields in the same record |
field_sum |
Sum of named fields must equal a target (within optional tolerance) |
geospatial_bounds |
Lat/lon pair within a bounding box |
date_diff |
Difference between two date fields within a range |
ratio_check |
Ratio of two numeric fields within a range |
age_match |
Declared age consistent with date-of-birth field |
Rules have severity: error (blocks the record) or severity: warning (flags but allows).
Any rule can include a condition block so it applies only when a condition on another field holds — value, not_value, or present: true|false.
Full reference: docs/rules/
How it compares
A mature data governance programme operates across three layers, each with a distinct job:
| Layer | Purpose | Tools |
|---|---|---|
| 1. Write-time enforcement | Prevent bad data from entering any system | OpenDQV Core |
| 2. Catalog / governance / stewardship | Ownership, glossary, lineage, policy, stewardship workflows | Alation, Atlan, Collibra, Purview, DataHub, Marmot |
| 3. Pipeline testing / observability | Detect drift, freshness issues, residual quality after ingestion | Great Expectations, Soda Core, dbt tests, Monte Carlo |
OpenDQV Core owns layer one. Your catalog handles layer two, your pipeline tools handle layer three.
| Great Expectations / Soda / dbt | OpenDQV Core | |
|---|---|---|
| When | After data lands (in warehouse/lake) | Before data is written (at the door) |
| Where | Data pipelines, batch jobs | Source system integration points |
| Model | Scan data at rest | Validate data in flight |
| Latency | Minutes to hours (batch) | Milliseconds (API call) |
| Who calls it | Data engineers | Data engineers, developers, CRM admins |
They're complementary. Use Great Expectations to monitor your warehouse. Use OpenDQV Core to stop bad data from getting there in the first place.
Contracts
41 production-ready contracts ship inside the opendqv package covering GDPR, HIPAA, SOX, MiFID II,
UK Building Safety Act, Martyn's Law, Natasha's Law, Ofcom Online Safety Act, EU DORA,
and 20+ other regulatory frameworks across UK, EU, and US. pip install opendqv gives you all of them
— opendqv list works with zero configuration.
See docs/compliance-contracts.md for the full list with regulatory context, or browse opendqv/contracts/ directly. 17 minimal starter templates are in examples/starter_contracts/.
Performance
EC2 c6i.large, 2 workers, 12-rule contract, mixed 50/50 workload:
~482 req/s, p99 ~182 ms. Sizing rule: WEB_CONCURRENCY = number of vCPUs.
See docs/benchmark_throughput.md for full platform comparison, methodology, and monthly volume extrapolation.
Documentation
| Quickstart | Build your first contract in 15 minutes |
| Rules Reference | All rule types with parameters and examples |
| Compliance Contracts | Regulatory context for the compliance-critical bundled contracts |
| API Reference | REST endpoints, SDK, GraphQL, webhooks |
| Security | Deployment checklist, threat model, RBAC |
| Production Deployment | Token auth, TLS, Docker Compose, hardening |
| Integrations | Integration guides and examples — Salesforce, Kafka, Snowflake, dbt, Databricks, the MCP server, importers, code-generator targets, and more |
| All docs → | The full documentation set |
API Stability
OpenDQV Core is Beta (Beta since 2.0.0; currently 3.x). What that means today:
- REST API endpoints — paths, request bodies and response shapes are stable within
3.x. Removing or reshaping one needs a major version. - Python SDK —
OpenDQVClient,AsyncOpenDQVClientandLocalValidatorpublic method signatures are stable within3.x. Internal helpers (prefixed_) are not covered. - MCP tools — tool names and parameters are stable within
3.x. - YAML contract format — removing a top-level key or a rule type needs a major version (3.0.0 removed
contexts:and thecontract:wrapper). New rule types and keys may be added in any release. - Rule verdicts — Core and OpenDQV Cloud's managed engine are being held to one set of semantics, checked against a shared conformance fixture (
docs/contract_conformance.md). When the engines disagree on a verdict or an error code, the side that is wrong is fixed in its next release — patch releases included — with no deprecation period. Every such change is listed in the CHANGELOG with the records it affects; pin an exact version if you need verdicts to stay fixed, and read the CHANGELOG before upgrading. - Security fixes — ship in the latest release. There are no maintained older lines and no backports; upgrade to the latest
3.x.
Presence and null handling (v2.5+)
- Presence is explicit. A format rule (
regex,min,max_length,date_format, …) never implies that a field must exist — addnot_empty/not_empty_stringwhen it must. Every non-presence rule treats a missing,null, or blank value (or an empty[]/{}) as absent and passes. A cross-field rule (compare,field_sum,ratio_check,date_diff, …) whose counterpart is absent or blank fails, and the error entry carriescounterpart_missing: true. Seedocs/contract_conformance.md. - Unknown rule types are refused at load (v2.8+). A typo in
type:(e.g.min_lenght) is a load error naming the known types — on the REST rule endpoints (422), the MCP draft tool, every importer, and a stored YAML file (the contract does not load; the refusal is logged;opendqv lintcatches it before deploy). Until 2.7 such a rule loaded as a disabled rule that passed everything. Both engines refuse the same day.
Contributing
See CONTRIBUTING.md for setup instructions, coding guidelines, and how to submit changes.
License
MIT — see LICENSE.
Acknowledgements
Led by Sunny Sharma, BGMS Consultants Limited. The vision, the architecture, every contract, and every design decision in this repository are directed by a human who believes data quality is a write-time responsibility.
OpenDQV is built with a hybrid team. Sunny leads — carbon and silicon. Three AI collaborators execute: Claude Sonnet 4.6 (primary developer), Claude Opus 4.6 (strategic auditor), and Grok (market intelligence). All answer to the same ethos: trust is easier to build than to repair.
Metadata
Release files for opendqv 3.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| opendqv-3.0.10.tar.gz | 365.1 kB | With provenance | Details for opendqv-3.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opendqv-3.0.10-py3-none-any.whl | Python 3 | none | any | Details for opendqv-3.0.10-py3-none-any.whl |
Total release size: 801.1 kB
Release files / opendqv-3.0.10.tar.gz
| Download URL | opendqv-3.0.10.tar.gz |
|---|---|
| Size | 365.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b25c748979245eb5512915cd8919baff09736bf3806d97cc5786ac4406dd3aad
|
|
BLAKE2b-256 checksum How to use checksums |
905088ef67261c6fdc48df566e04e0702ceb93890cd467e82bbc69e674c99f55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / opendqv-3.0.10-py3-none-any.whl
| Download URL | opendqv-3.0.10-py3-none-any.whl |
|---|---|
| Size | 436.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89dfef851a0288a1f21b3faef35c5202e52be22c0a2d6b3394d5a7b7cdc7b755
|
|
BLAKE2b-256 checksum How to use checksums |
0905ae84db8fff7f19acd304a6e0ec74fec565b73644906450e6f45f95452e33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for opendqv 3.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for opendqv-3.0.10.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.