AI Data Supply Chain Trust & Provenance Platform
Project description
TrustPipe
AI Data Supply Chain Trust & Provenance Platform
Track data provenance, score trust, detect poisoning, and generate compliance reports — inside your existing data pipelines.
The 3-Line Promise
from trustpipe import TrustPipe # 1. Import
tp = TrustPipe() # 2. Initialize (zero-config)
tp.track(df, name="customers") # 3. Track
That's it. Provenance recorded. Merkle chain extended. Trust scored. Query anytime.
Why TrustPipe?
| Problem | Impact |
|---|---|
| EU AI Act Article 10 enforcement begins August 2026 | Few orgs have data provenance docs |
| 87% of AI projects fail — primary cause: data quality | $406M avg annual loss per org |
| Data poisoning attacks now target RAG, fine-tuning, MCP tools | Most orgs have zero detection |
No infrastructure exists to solve all three inside the data pipeline. TrustPipe does.
Three Independent Layers
| Layer | What It Does | Works Alone? |
|---|---|---|
| Provenance | Track where data came from (Merkle-backed, tamper-evident) | ✓ |
| Trust | Score data quality and safety (0-100, six dimensions) | ✓ |
| Compliance | Generate regulatory documents (EU AI Act, data cards) | ✓ |
Quick Start
pip install trustpipe
Track Data Provenance
from trustpipe import TrustPipe
tp = TrustPipe()
# Track a raw dataset
raw = tp.track(df_raw, name="raw_customers", source="s3://bucket/raw/")
# Track a transformation with parent linkage
clean = tp.track(df_clean, name="clean_customers", parent=raw.id)
# View the full chain
for record in tp.trace("clean_customers"):
print(f"{record.name} ← {record.source} ({record.row_count} rows)")
Trust Scoring (0-100)
score = tp.score(df, name="customers")
print(score.explain())
# Trust Score: 95/100 (Grade: A+)
#
# Completeness ████████████████████ 100.0 (w=0.20)
# Consistency ████████████████████ 100.0 (w=0.20)
# Poisoning Risk ████████████████████ 100.0 (w=0.15)
# Freshness ████████████████████ 100.0 (w=0.15)
# Drift ████████████████░░░░ 80.0 (w=0.15)
# Provenance Depth ██████████████░░░░░░ 70.0 (w=0.15)
Six dimensions: Provenance Depth, Freshness, Completeness, Consistency, Drift, Poisoning Risk.
Poisoning Scan
result = tp.scan(df)
# 0 anomalies / 10000 rows (zscore fallback)
# With PyOD installed: Isolation Forest detection
Drift Detection
score = tp.score(new_data, name="features", reference=baseline_data)
# Drift dimension drops when distributions shift
EU AI Act Compliance Report
report = tp.comply("training_set", regulation="eu-ai-act-article-10")
# Generates full Article 10 report with gap analysis:
# - Data sources & lineage (Art. 10(2)(a))
# - Quality metrics (Art. 10(2)(b))
# - Bias assessment (Art. 10(2)(f))
# - 10-point compliance gap analysis with recommendations
Also supports datacard and audit-log report types.
Pandas Auto-Tracking
tp.pandas() # activate once
df = pd.read_csv("data.csv") # auto-tracked
df.to_parquet("output.parquet") # auto-tracked
Airflow Integration
from trustpipe.plugins.airflow_plugin import trustpipe_task
@trustpipe_task(tp, name="etl_output", inputs=["raw_data"])
@task
def transform(data):
return processed_data # auto-tracked with parent linkage
dbt Integration
from trustpipe.plugins.dbt_plugin import DbtPlugin
dbt = DbtPlugin(tp)
dbt.import_manifest("target/manifest.json") # imports full lineage
dbt.import_run_results("target/run_results.json") # tracks execution
REST API
trustpipe serve --port 8000
# POST /track, GET /trace/{name}, GET /score/{name}
# GET /comply/{name}, GET /verify, GET /export
# Auto-generated docs at /docs
Web Dashboard
trustpipe dashboard --port 8050
# Overview: trust score gauges per dataset
# Records: searchable/sortable provenance table
# Compliance: gap summary across all datasets
CI/CD Trust Gate
# Fail CI if trust score < threshold
trustpipe gate training_set --threshold 70
# Exit 0 = PASS, Exit 1 = FAIL
GitHub Actions workflow included — see .github/workflows/trust-gate.yml.
Multi-Project Federation
from trustpipe.core.federation import Federation
fed = Federation([prod_tp, staging_tp, ml_tp])
fed.status() # unified status across all projects
fed.search("customers") # find dataset across all projects
fed.verify_all() # integrity check everywhere
Webhook / Slack Alerts
from trustpipe.alerts.webhook import AlertManager, SlackAlert
alerts = AlertManager()
alerts.add(SlackAlert(webhook_url="https://hooks.slack.com/..."))
alerts.check_score("training_set", score, threshold=70) # alerts on drop
alerts.check_integrity(verify_result) # alerts on failure
CLI Commands
| Command | Purpose |
|---|---|
trustpipe init |
Initialize project |
trustpipe trace <dataset> |
Show provenance chain (tree/table/json) |
trustpipe verify |
Verify Merkle chain integrity |
trustpipe status |
Project summary |
trustpipe score <dataset> |
Trust score (0-100) with dimension breakdown |
trustpipe scan <file> |
Poisoning / anomaly scan |
trustpipe comply <dataset> |
Compliance report (EU AI Act, datacard, audit-log) |
trustpipe export |
Export provenance data (JSON/CSV) |
trustpipe gate <dataset> |
CI/CD trust gate (exit 1 if below threshold) |
trustpipe dashboard |
Launch web dashboard |
trustpipe serve |
Launch REST API server |
Installation
# Core only (provenance + CLI, 5 lightweight deps)
pip install trustpipe
# With trust scoring (adds pandas, numpy)
pip install trustpipe[trust]
# With drift detection
pip install trustpipe[drift]
# With poisoning detection
pip install trustpipe[poisoning]
# Plugins
pip install trustpipe[spark] # PySpark integration
pip install trustpipe[api] # FastAPI REST server
pip install trustpipe[dashboard] # Plotly Dash web UI
# Everything
pip install trustpipe[all]
# Development
pip install trustpipe[dev]
Storage Backends
| Backend | Use Case | Config |
|---|---|---|
| SQLite (default) | Local dev, single user | Zero-config, ~/.trustpipe/ |
| PostgreSQL | Team collaboration | pip install trustpipe[postgres] |
| S3 | Enterprise scale | pip install trustpipe[s3] |
Architecture
Your Pipeline (Spark / Airflow / Pandas / dbt / Kafka)
│
▼
┌──────────────────────────────────────────┐
│ TrustPipe SDK │
│ │
│ Layer 1: Provenance │
│ ┌────────────────────────────────────┐ │
│ │ Merkle chain · Lineage DAG · Tags │ │
│ └────────────────────────────────────┘ │
│ │
│ Layer 2: Trust │
│ ┌────────────────────────────────────┐ │
│ │ 6 dimensions · Drift · Poisoning │ │
│ └────────────────────────────────────┘ │
│ │
│ Layer 3: Compliance │
│ ┌────────────────────────────────────┐ │
│ │ EU AI Act · Data Cards · Audits │ │
│ └────────────────────────────────────┘ │
│ │
│ Plugins: Pandas·Spark·Airflow·dbt·Kafka │
│ Storage: SQLite · PostgreSQL · S3 │
│ Alerts: Webhook · Slack │
│ Serve: REST API · Web Dashboard │
└──────────────────────────────────────────┘
Design Principles
- Zero-config start — works out of the box with SQLite
- 3-line integration — no rewriting existing pipelines
- Data fingerprinting only — NEVER stores your raw data
- Not blockchain — Merkle hash tree (same as git), zero overhead
- LLM-enhanced, not LLM-dependent — core works fully offline
- Graceful degradation — missing optional deps return neutral scores, never crash
- Pluggable everything — storage, scoring, compliance templates, alert destinations
Testing
make test # full suite (118 tests)
make test-quick # unit tests only
make lint # ruff check
License
Apache 2.0 — open source, enterprise-friendly.
Project details
Release history Release notifications | RSS feed
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 trustpipe-0.1.0.tar.gz.
File metadata
- Download URL: trustpipe-0.1.0.tar.gz
- Upload date:
- Size: 73.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3983b035b432f5d14e6947391a1bb1e63f5589be8c223103988eb37984cdf94
|
|
| MD5 |
01a368ce0fc157f767f675c07e567338
|
|
| BLAKE2b-256 |
73c960e067651af9d4daa96765d64d262a4fdb2b8b57ccb0eaa00e7cb6573c74
|
Provenance
The following attestation bundles were made for trustpipe-0.1.0.tar.gz:
Publisher:
release.yml on pallavi-chandrashekar/trustpipe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trustpipe-0.1.0.tar.gz -
Subject digest:
d3983b035b432f5d14e6947391a1bb1e63f5589be8c223103988eb37984cdf94 - Sigstore transparency entry: 1364836319
- Sigstore integration time:
-
Permalink:
pallavi-chandrashekar/trustpipe@f5d147e35f3062972da180ecd22caace3f2162b7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pallavi-chandrashekar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f5d147e35f3062972da180ecd22caace3f2162b7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file trustpipe-0.1.0-py3-none-any.whl.
File metadata
- Download URL: trustpipe-0.1.0-py3-none-any.whl
- Upload date:
- Size: 70.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6f41b1decc174b066d0262b45f82c5921a5d1282cf4127852e6d980cd586f91
|
|
| MD5 |
59b8f31fce26e4d0ee795327498fc997
|
|
| BLAKE2b-256 |
61a7aa8d731d6bfe79b54b12616e71f53e857f18575f7266bac47bfe55c5ea13
|
Provenance
The following attestation bundles were made for trustpipe-0.1.0-py3-none-any.whl:
Publisher:
release.yml on pallavi-chandrashekar/trustpipe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trustpipe-0.1.0-py3-none-any.whl -
Subject digest:
a6f41b1decc174b066d0262b45f82c5921a5d1282cf4127852e6d980cd586f91 - Sigstore transparency entry: 1364836321
- Sigstore integration time:
-
Permalink:
pallavi-chandrashekar/trustpipe@f5d147e35f3062972da180ecd22caace3f2162b7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pallavi-chandrashekar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f5d147e35f3062972da180ecd22caace3f2162b7 -
Trigger Event:
release
-
Statement type: