Skip to main content

Model-agnostic PII firewall for LLM apps. Scan, redact, rescan, verify.

Project description

shutapp — the model-agnostic PII firewall

Three lines. Any LLM.

from shutapp import Shutapp

g = Shutapp(api_key="shu_live_...")
safe, session = g.scan("My email is john@acme.com")

# ...send `safe` to any LLM using your own provider key...

final = g.unscan(response_text, session)

Or the 2-line auto-wrap for OpenAI / Anthropic:

from openai import OpenAI
from shutapp import guard
client = guard(OpenAI())          # every .chat.completions.create call is now protected
from anthropic import Anthropic
from shutapp import guard
client = guard(Anthropic())       # every .messages.create call is now protected

What it does

  1. Sends your prompt text to the Shutapp API, which replaces PII with reversible placeholders like [EMAIL_ADDRESS_1], [PHONE_NUMBER_1], [API_KEY_1].
  2. You send the redacted text to any LLM using your own key. Shutapp never sees your LLM key and never sees the response.
  3. You call unscan(...) to restore the original values in the LLM's response.

After every scan Shutapp prints a one-line receipt to your terminal:

[shutapp] scan ok · 12ms · EMAIL_ADDRESS x1, PHONE_NUMBER x1 · rcpt_8f3a2b

Install (from PyPI, later)

pip install shutapp

Install (from this monorepo, right now)

pip install -e ./packages/sdk-python

Config

Shutapp(api_key, base_url, receipts, receipt_format, timeout)

  • receipts: "stderr" (default), "stdout", "silent", or a callable fn(receipt_dict) for custom logging.
  • receipt_format: "line" or "block".
  • base_url: override for self-hosted Shutapp (e.g. http://localhost:8080).

Project details


Download files

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

Source Distribution

shutapp-1.1.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

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

shutapp-1.1.0-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file shutapp-1.1.0.tar.gz.

File metadata

  • Download URL: shutapp-1.1.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for shutapp-1.1.0.tar.gz
Algorithm Hash digest
SHA256 1e1c509b178803fa56a5436731a6b4b3cf20fff740972d607fb0a55a33b18960
MD5 585299e69d564279249cb0a285996275
BLAKE2b-256 b9a33d12ed9b45b7bcbec2517f4e8f613259956349a849bbbc7b2c424e99d744

See more details on using hashes here.

File details

Details for the file shutapp-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: shutapp-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for shutapp-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 060318c3075960dd8f8d9a6276c15e2b680e7f5296c879ef35311f36a2dc6c3a
MD5 092fd9df248162e6b5603652a58713d0
BLAKE2b-256 03bd4c61b967e6505f0f3d5aea5e0c8eaada1ef2f9c90b33d8684b7913b2595a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page