Skip to main content

PyDBTGuard

PyPI

Pre-deployment validation for dbt tests: analyze risk, impact, and cost from local dbt artifacts (manifest.json, run_results.json) without connecting to a warehouse.

Not to be confused with PyAirflowTester or PyBlastRadius: PyDBTGuard statically analyzes a dbt manifest.json; PyAirflowTester validates Airflow DAGs and dbt runs; PyBlastRadius simulates cascading-failure impact across whole systems.

Which project do I need?

Part of the Mullassery open-source family. These tools have similar names — here is the short version of who does what:

If you need to… Use
Build a repository's dependency graph and match it against vulnerability advisories (Python, Rust, Node, containers) PyDeepMesh
Understand why a Python dependency exists, who added it, and whether it is actually used PyDependencyCheck
Statically analyze a dbt project (risky tests, test blast radius, cost) PyDBTGuard
Statically analyze Apache Beam / Dataflow pipelines (cost, hot keys, reliability) PyBeamGuard
Validate Airflow DAGs and dbt runs PyAirflowTester
Simulate cascading-failure blast radius across infrastructure, data pipelines, and AI systems PyBlastRadius
Check the quality of the data itself at runtime (schema, drift, anomalies) StatGuardian
Discover devices, services, and vulnerabilities on a network PyNetworkIntel
Discover and score API security risk (real traffic, agent/MCP, Cedar policy) PyAPICheck
Trace and root-cause AI agent failures PyAgentHound
Diagnose RAG retrieval failures PyVectorHound
Orchestrate local, dependency-aware tasks (DAG scheduler + content-addressed cache) PyTaskWireCheck

Browse all projects →

What it is

PyDBTGuard reads compiled dbt metadata to help you understand which tests are risky, which downstream models they protect, and how to prioritize testing. It works entirely from local artifacts—no live warehouse queries. A Rust core supports failure prediction based on historical run results.

Features / Highlights

  • Risk scoring: Heuristic reliability scoring for each test based on test type and metadata from manifest.json.
  • Failure prediction: Computes historical failure probability from accumulated run_results.json files (wired to Rust FailurePredictor).
  • Impact analysis: Maps tests to affected downstream models using the dbt lineage graph (blast radius).
  • Coverage audit: Identifies missing test coverage by model and prioritizes gaps.
  • Cost estimation: Estimates relative test cost from manifest metadata.
  • Diagnostics: Generates diagnostic hints for tests based on patterns in names/config.
  • CLI-first: Simple commands to analyze, diagnose, audit coverage, and estimate cost.

Who it's for / Use cases

  • Pre-PR checks: Quickly assess which tests are high-risk before running the full suite.
  • CI optimization: Prioritize tests that protect critical downstream models.
  • dbt maintenance: Audit coverage gaps and understand test impact across lineage.
  • Historical insights: Leverage past run_results.json to gauge test stability.

What it is not

  • Not a full dbt observability platform: Focused on pre-deployment risk/impact analysis from artifacts; no alerting, dashboards, or SLA tracking.
  • Not warehouse-connected: Does not query Snowflake, BigQuery, or other warehouses. Warehouse connector classes exist in the codebase but are not wired to CLI commands.
  • Not ML-powered: Reliability scoring uses fixed heuristics; failure probability is a historical failure rate computed from run history, not a trained model.
  • Experimental in places: Some commands (optimize, pr-check, replay) are stubs or simulated. See roadmap for details.

Project status

Version 2.0.0. Core analysis features (analyze, coverage-audit, diagnose, cost, blast radius) are implemented and tested (30/30 Python tests pass). Historical failure prediction is wired to the Rust core. Some features remain stubbed/simulated; see ROADMAP_HONEST.md for honest limitations.

Installation

pip install pydbtguard

From source:

git clone https://github.com/Mullassery/PyDBTGuard
cd PyDBTGuard
pip install maturin
maturin develop

Requires Python 3.9+.

Quick start

# Analyze tests in a dbt project (from manifest.json in target/)
pydbtguard analyze /path/to/dbt/project

# Save report as JSON
pydbtguard analyze /path/to/dbt/project --output report.json

# Diagnose a specific test
pydbtguard diagnose --test my_model_unique_key

# Audit test coverage
pydbtguard coverage-audit /path/to/dbt/project

# Estimate test cost
pydbtguard cost /path/to/dbt/project

The CLI expects compiled dbt artifacts (target/manifest.json). For historical failure probability, include target/run_results.json (or multiple runs accumulated by your process).

Manifest diff (state:modified without a warehouse)

pydbtguard diff base/target/manifest.json current/target/manifest.json --format markdown --fail-on-change

Reports added/removed/modified models, added/removed tests, and tests attached to or depending on changed models. Reads artifacts only.

CI

A composite GitHub Action and PR example live in docs/CI.md. It runs the manifest diff and writes the report to the job summary.

Releasing

See docs/RELEASE.md for the Trusted Publishing setup and the wheel matrix.

Documentation

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.

Metadata

Release files for pydbtguard 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydbtguard 2.2.0
File Size Uploaded Provenance Actions
pydbtguard-2.2.0.tar.gz 37.4 kB Without provenance Details for pydbtguard-2.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pydbtguard 2.2.0
File Interpreter ABI Platform Actions
pydbtguard-2.2.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for pydbtguard-2.2.0-cp39-abi3-macosx_11_0_arm64.whl

Total release size: 466.4 kB

Release files / pydbtguard-2.2.0.tar.gz

Download URL pydbtguard-2.2.0.tar.gz
Size 37.4 kB
Tags Source
SHA-256 checksum
How to use checksums
98cbbbbbc50861d2b4a5f88ef56f3f4c706252d0dadacbee6995b2978f756ae4
BLAKE2b-256 checksum
How to use checksums
d6db31c57473ffbb763d0c87d26c51a92a8cec658286e21d326819df8ca532c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / pydbtguard-2.2.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL pydbtguard-2.2.0-cp39-abi3-macosx_11_0_arm64.whl
Size 429.0 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fb7d947a0f06b837eb8c11f3d58e74702efe4a1192c1bfcc30a916b4ec2b8022
BLAKE2b-256 checksum
How to use checksums
83915f8a930600e3cb658e7d64f1f3d09d116f94b519bd46928c4b5a6ed45947
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for pydbtguard 2.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page