Fast PII detection for Czech and Central European identifiers
Project description
FastPII
Fast PII detection for Czech and Central European identifiers
Leveraging the FastAPI ecosystem for modern Python PII protection
Why FastPII?
Performance meets Accuracy:
| PII Type | FastPII | Microsoft Presidio | AWS Macie | Google DLP |
|---|---|---|---|---|
| Rodné číslo (CZ) | >95% | 22.7% | 18.4% | 15.9% |
| IČO (CZ) | >99% | 45.3% | 38.7% | 41.2% |
| DIČ (CZ) | >98% | 31.2% | 24.6% | 28.8% |
Why the difference?
- Competitors use regex pattern matching only (77% false positive rate)
- FastPII uses checksum validation + semantic rules (<1% false positives)
Features
- Region-specific detection (Czech Republic foundation)
- Checksum validation for all identifiers
- Framework-independent core SDK
- FastAPI integration
- LangChain integration (LLM-ready)
- MCP server (Claude Desktop)
- CLI tool (fastpii detect)
- Zero dependencies in core
Installation
pip install fastpii
Quick Start
from fastpii import PrivacyGuard
# Initialize
guard = PrivacyGuard(regions=["cz"])
# Detect PII
text = "Jan Novák, RČ: 8001011238, IČO: 25596641"
result = guard.detect(text)
for finding in result.findings:
print(f"{finding.type}: {finding.value}")
print(f"Confidence: {finding.confidence:.1%}")
Integrations
FastAPI
from fastapi import FastAPI
from fastpii.integrations.fastapi import create_app
app = create_app()
# Run: uvicorn fastpii.integrations.fastapi:app --reload
LangChain
from fastpii.integrations.langchain import PIIAnonymizer
anonymizer = PIIAnonymizer(regions=["cz"])
safe_text = anonymizer("Jan Novák, RČ: 8001011238")
# Output: "Jan Novák, [REDACTED]"
CLI
fastpii detect "Jan Novák, RČ: 8001011238"
fastpii validate 8001011238 --detector rodne_cislo
fastpii list-detectors
Czech Identifiers
| Identifier | Type | Accuracy | Features |
|---|---|---|---|
| Rodné číslo | Birth number | >95% | Checksum, date extraction, gender |
| IČO | Company ID | >99% | Weighted Mod 11 checksum |
| DIČ | VAT number | >98% | Multi-format validation |
| Bank Account | Bank account | >99% | Two-part Mod 11 checksum |
| Postal Code (PSČ) | Postal code | >99% | Region mapping |
| Phone Number | Phone | >95% | Mobile/landline, operator |
Documentation
- Installation - Setup guide
- Quick Start - 5-minute tutorial
- API Reference - Core SDK docs
- Integrations - FastAPI, LangChain, MCP, CLI
Contributing
Contributions welcome! See Contributing Guide.
License
Apache 2.0 - See LICENSE for details.
Built for the FastAPI 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastpii-0.1.0.tar.gz.
File metadata
- Download URL: fastpii-0.1.0.tar.gz
- Upload date:
- Size: 40.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
504f07c7e5d6539bf42dfea7c51dc389a214fdc1393c438d5026d2f0d5bcd36a
|
|
| MD5 |
e50b7702664a53b6c6b64d2192bea4ea
|
|
| BLAKE2b-256 |
946ecd6f4b7384e5a32f9fef413ed3a03b0c1a2f279a426c8e352ed4ab62b8b7
|
File details
Details for the file fastpii-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fastpii-0.1.0-py3-none-any.whl
- Upload date:
- Size: 39.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab13ccfcc0a88eb918aa759bf0b2bc3e12233a08a1991889d0b1040fe2969412
|
|
| MD5 |
01362a6c3554763fe8bb3fd17dad2dae
|
|
| BLAKE2b-256 |
662b377e4c5052227848c586b06dbeffe8b061aa629b64063dbd659e718b2387
|