Skip to main content

🛡️ Enterprise PII Guardrails Studio

High-Performance, Zero-Leak AI Privacy Gateway for Enterprise LLM Pipelines

PyPI Version Python Version Security Platform


PyPI PackageDocumentationReport Issue


⚡ Overview

Enterprise PII Guardrails Studio is an ultra-fast, defense-in-depth privacy gateway designed to intercept, detect, mask, and pseudonymize Personally Identifiable Information (PII) before it ever touches public LLM APIs (OpenAI, Anthropic, Gemini) or third-party vector databases.

Equipped with an in-memory authorization cache, asynchronous audit pipeline, and multi-tier regex + NLP models, it sustains sub-25ms live masking latency while safeguarding compliance with GDPR, HIPAA, PCI-DSS, and CCPA.


🚀 Quickstart

Method 1: Using pip (Standard Python)

# 1. Install from PyPI
pip install piiguardrails

# 2. Launch the studio
piiguardrails

Method 2: Using uv (Instant Sandbox — Zero Setup)

Run directly in a self-contained, isolated environment without polluting global Python:

uv run --with piiguardrails piiguardrails

🖥️ First-Run Setup & UI Access

On first launch, piiguardrails automatically provisions the core engine and configures your encrypted local database.

  1. A quick 30-second setup wizard prompts you in the terminal for your Company Name and Admin Password.
  2. Once initialized, the studio launches on: 👉 http://localhost:8000
  3. Log in with your admin credentials to access the live dashboard, manage API keys, customize PII detection rules, and monitor telemetry.

🧩 Python Integration Example

Once the studio is running, integrate it directly into your LangChain, LlamaIndex, or raw API pipeline:

import requests

API_KEY = "your-api-key-here"  # Generated in the Studio UI
headers = {"X-API-Key": API_KEY, "Content-Type": "application/json"}

# 1. Mask sensitive input before sending to LLM
payload = {
    "text": "Hello Alice Smith, your verification code was sent to alice.smith@acme.corp. Call us at 415-555-2671."
}

mask_response = requests.post("http://localhost:8000/mask", json=payload, headers=headers).json()
print("Masked text for LLM:", mask_response["masked_text"])
# Output: "Hello <PERSON_1>, your verification code was sent to <EMAIL_1>. Call us at <PHONE_1>."

# 2. Query your LLM with safe, masked prompt...
# simulated_llm_reply = "We contacted <PERSON_1> at <EMAIL_1> regarding the ticket."

# 3. Unmask the LLM response back to real entities for your user
unmask_payload = {
    "text": "We contacted <PERSON_1> at <EMAIL_1>.",
    "mapping": mask_response["mapping"]
}
unmask_response = requests.post("http://localhost:8000/unmask", json=unmask_payload, headers=headers).json()
print("Restored response:", unmask_response["unmasked_text"])
# Output: "We contacted Alice Smith at alice.smith@acme.corp."

🛡️ Key Capabilities & Architecture

Feature Description
Blazing Fast (<25ms) In-memory LRU authorization caching + asynchronous non-blocking SQLite/SQLCipher audit worker thread.
30+ Entity Recognizers SSN, Credit Cards, IBAN, Passports, Names, Emails, Phone Numbers, IP/MAC addresses, API keys, JWTs, Medical IDs.
AES-256 Storage Built-in SQLCipher encryption ensures all audit logs, API keys, and configurations are hardware-locked and encrypted at rest.
Zero-Footprint Cleanup Automatic boot-time and shutdown sweeps safely purge temporary runtime artifacts to prevent disk bloat across repeated runs.
Modern Management UI Material Design 3 / MUI dashboard for live telemetry, access keys, policy rules, and audit logs.
Deterministic Reverse Tokenizer Flawless restoration (/unmask) of LLM responses back to original values for authorized consumers.

📋 System Requirements

  • Operating System: Windows 10, Windows 11, Windows Server (64-bit)
  • Python: >= 3.8 (or uv)
  • Memory: Minimum 2 GB RAM
  • Port: Default 8000 (configurable via .env or --port)

📄 License

Proprietary / Enterprise Commercial License. All rights reserved.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

piiguardrails-2.0.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

piiguardrails-2.0.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file piiguardrails-2.0.1.tar.gz.

File metadata

  • Download URL: piiguardrails-2.0.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.12

File hashes

Hashes for piiguardrails-2.0.1.tar.gz
Algorithm Hash digest
SHA256 a71e57e63e6e62b424ba52c3dcd114881ec412d988f50115f5f5f2522adb2590
MD5 646d263cb9e1e9e29cd051473f043f5a
BLAKE2b-256 8ee278b0699f0341f7815678ac4ca18fe53fc82e653011642e0f4bd25b29ad4b

See more details on using hashes here.

File details

Details for the file piiguardrails-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: piiguardrails-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.12

File hashes

Hashes for piiguardrails-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7bd21f6151d4ed85bd4d42c6e77ef2ab28448074b738b39e7c54459f02969d54
MD5 7f62476ed0754428d380b570c943633b
BLAKE2b-256 9944a47fe65e50fd997bf2b97bab2f0174ed4cb9f414b00b31123d2de1fc5c6a

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.5

2 files

2.0.4

2 files

2.0.3

2 files

2.0.2

2 files

This release

2.0.1 This release

2 files

2.0.0

2 files

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