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
Metadata
Release files for papa-guard 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| papa_guard-0.1.0.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| papa_guard-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.7 kB
Release files / papa_guard-0.1.0.tar.gz
| Download URL | papa_guard-0.1.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c22d1f5b6c2fcc58dd9e89347e7c9764deaf41057a34e94ba6072022d7135a9
|
|
BLAKE2b-256 checksum How to use checksums |
e402f484b813e5c983571ba6cd11ac91c1eedf9420d9fcfe9f8df4bf9e1a04ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / papa_guard-0.1.0-py3-none-any.whl
| Download URL | papa_guard-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e2777a53fbb2bb30b04847db2e9a28e0f0a0aa2bbac348a619ad35ea02b1913
|
|
BLAKE2b-256 checksum How to use checksums |
80a309b36f4e3318597bc52990027ff64be00150620148f23a3ceea9f9b50880
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|