Skip to main content

AI safety middleware: PII filter, injection guard, cost tracker

Project description

papa-guard

AI safety middleware for Russian-language AI systems.
PII filter (ФЗ-152) + injection guard + cost tracker.

Install

pip install papa-guard

Quick Start

from papa_guard import Guard

guard = Guard()
result = guard.check_input("Звоните +7 999 123-45-67 Ивану Петровичу")

print(result.sanitized_text)   # "Звоните [ТЕЛЕФОН] [ФИО]"
print(result.pii_redacted_count)  # 2
print(result.blocked)   # False

Why papa-guard?

Feature papa-guard presidio no solution
Russian PII ✅ native partial
Zero ML deps
Injection guard
Cost tracking
ФЗ-152 compliant partial
Processing time <5ms ~50ms 0ms

Used by

  • papa-app (multi-agent AI orchestration)
  • papa-lang ecosystem

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

papa_guard-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

papa_guard-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file papa_guard-0.1.0.tar.gz.

File metadata

  • Download URL: papa_guard-0.1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for papa_guard-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4c22d1f5b6c2fcc58dd9e89347e7c9764deaf41057a34e94ba6072022d7135a9
MD5 7f1c386376f39091ea72d21226825b79
BLAKE2b-256 e402f484b813e5c983571ba6cd11ac91c1eedf9420d9fcfe9f8df4bf9e1a04ce

See more details on using hashes here.

File details

Details for the file papa_guard-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: papa_guard-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for papa_guard-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e2777a53fbb2bb30b04847db2e9a28e0f0a0aa2bbac348a619ad35ea02b1913
MD5 82e75cc2c245da7fc83c65d164bd1912
BLAKE2b-256 80a309b36f4e3318597bc52990027ff64be00150620148f23a3ceea9f9b50880

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