{"repo":"DataFog/datafog-python","free":true,"listed":false,"github":"https://github.com/DataFog/datafog-python","clone":"git clone https://github.com/DataFog/datafog-python.git","description":"Offline PII firewall for AI agents and LLM apps: fast local detection and redaction, Claude Code hook, LiteLLM guardrail. Zero network calls, one dependency.","language":"Python","stars":68,"topics":["data-privacy","nlp","python","sdk","pii","pii-detection","pii-redaction","data-protection","de-identification","anonymization"],"license":"MIT","category":"machine-learning","readme_excerpt":"# DataFog Python DataFog is a Python library for detecting and redacting personally identifiable information (PII). It provides: - Fast structured PII detection via regex - An offline PII firewall for AI agents: a Claude Code hook and a LiteLLM gateway guardrail (introduced in 4.6) - Optional NER support via spaCy and GLiNER - A simple agent-oriented API for LLM applications - Backward-compatible DataFog and TextService classes Agent & Gateway Firewall DataFog includes two ready-made enforcement points that catch PII at the moment it would leave your machine — offline, in microseconds, with matched values never echoed into logs or transcripts: - Claude Code hook ( datafog-hook ): gates agent tool calls (shell commands, web requests, file writes, MCP tools) and warns the model when prompts or tool results carry PII. 70–90ms per invocation including process startup. Easiest install is the Claude Code plugin: Manual hook setup and limitations: examples/claude code hook/. - LiteLLM guardrail ( DataFogGuardrail ): redacts or blocks PII in requests and responses at the gateway, for any LiteLLM-proxied provider. In-process ( 40µs per message scanned; a request clears the guardrail in well under a millisecond), no sidecar service. Setup: examples/litellm guardrail/. Both default to the high-precision entity set ( EMAIL , PHONE , CREDIT CARD , SSN ); noisier types are opt-in. Known-safe values can be exempted with an allowlist: scan(text, allowlist=[...]) for exact values, allowlist p","default_branch":null,"files":null,"tree":[],"storefront":"/r/DataFog","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/DataFog/datafog-python/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}