Python 3.10+ · FastAPI · LangChain · PydanticAI · Django
Python & FastAPI EU AI Act Controls
- Zero-dep spurvik_guard.py (stdlib only)
- Keyed HMAC-SHA256 logs · 0 prompt bytes
- Art. 14 Human Gate + 24-EU-lang badge.js
Hosted in Frankfurt (fra1) · 400 raw_content_rejected guard · MIT
Python & FastAPI Cockpit
fra1 · HMAC-SHA2561 · Pick your Python stack
2 · Visitor EU language
badge.js · en You are interacting with an AI system
3 · Console tier
Frontend Art. 50(1) notice · Backend inputHash: 9f3c…a41e (0 prompt bytes)
Replies are generated automatically by an AI system.
Previewing Pro above: unlocks POST /api/v1/hitl (Art. 14 human approval queue), 90-day Frankfurt logs, DPO engineering summary (.md), and white-label badge.js:
from fastapi import FastAPI
from openai import OpenAI
from spurvik_guard import art50_badge_html, send_telemetry_event
app, ai = FastAPI(), OpenAI()
@app.post("/api/chat")
def chat(prompt: str) -> dict:
res = ai.chat.completions.create(model="gpt-4o", messages=[{"role": "user", "content": prompt}])
reply = res.choices[0].message.content or ""
send_telemetry_event(prompt, reply, model_provider="openai", model_version="gpt-4o")
return {"reply": reply, "badge": art50_badge_html(system_name="FastAPI Copilot", locale="en")}
0 extra pip deps · sends keyed HMAC-SHA256 digests to fra1
Add Hosted HITL + White-Label · €19/moThree EU AI Act controls for Python backends
- 1
Scan
.pyfiles locally withnpx spurvik audit .for unwrapped LLM calls - 2
Log keyed HMAC-SHA256 digests to Frankfurt (
POST /api/v1/telemetry, 0 prompt bytes) - 3
Gate refunds, deletes & external sends via
request_human_approval()+badge.js
Why Python CTOs & DPOs choose Spurvik over raw observability logs
| Control | Standard APM / print logs | spurvik_guard.py + Frankfurt Vault |
|---|---|---|
| Prompt & customer PII | Plaintext prompts in log sinks | Keyed HMAC-SHA256 only (400 on raw text) |
| Extra Python dependencies | Heavy OpenTelemetry / Rust wheels | 0 pip packages (Python 3.10+ stdlib) |
| Art. 14 pre-execution gate | DIY database + Slack plumbing | POST /api/v1/hitl (field names only, Pro/Team) |
| Art. 50(1) frontend notice | Separate frontend build | art50_badge_html() in 24 EU languages |
| DPO & procurement handover | Manual spreadsheets | Pro DPO .md summary · Team Annex IV draft |
Python, FastAPI & LangChain EU AI Act FAQ
Does Spurvik work with Python, FastAPI, LangChain, PydanticAI and Django without Node.js in production?
Yes. Drop spurvik_guard.py (spurvik.com/r/spurvik_guard.py, MIT, Python 3.10+ stdlib only) into your FastAPI, Django, LangChain or PydanticAI service. It computes keyed HMAC-SHA256 digests locally with SPURVIK_CONTENT_HASH_SECRET and posts event fingerprints directly to https://console.spurvik.com/api/v1/telemetry with zero Node.js runtime or extra pip dependencies.
Does any prompt text, completion text or customer PII leave our Python server?
No. SPURVIK_CONTENT_HASH_SECRET stays on your server (>= 16 bytes) and produces 64-character hex HMAC-SHA256 digests (inputHash, outputHash). The Frankfurt ingestion endpoint rejects raw prompt or output fields with HTTP 400 raw_content_rejected, and Art. 14 human approval payloads accept sorted field names only (spurvik.payload_summary.v1).
Can npx spurvik audit scan Python (.py) repositories for unwrapped LLM calls?
Yes. Running npx -y spurvik@1.0.16 audit . locally or in GitHub Actions scans .py, .ts, .tsx, .js and .mjs files offline for unwrapped OpenAI, Anthropic and Gemini calls without reading or uploading prompt text.
Which plan should a Python B2B SaaS team pick?
Free (€0) includes 10,000 events/month and 30-day Frankfurt retention. Pro (€19/mo or €190/yr) adds 250,000 events/month, 90-day retention, the hosted Art. 14 human approval queue (POST /api/v1/hitl), DPO engineering summary (.md), and white-label badge.js. Team (€79/mo or €790/yr) adds 2,000,000 events/month, 12-month retention, webhook export, and the Annex IV technical documentation draft. Done-For-You (€199 once) gives you a 24h engineer PR + C2PA/DPO report and includes 1 full year of Pro.