Install
Package is pii-firewall on PyPI. Import from privacy_firewall.
Pick your install
Start with the recommended option. Add extras only when you need them.
Single-language apps
Skip [langdetect] and pass language="es" to create_firewall. Saves a dependency and removes auto-detection overhead.
| Command | What you get |
|---|---|
| pip install pii-firewall | Regex-only. No ML. Good for IDs, emails, phones. |
| pip install "pii-firewall[presidio,langdetect]" | Recommended. Named entities + 55-language auto-detect. |
| pip install "pii-firewall[all]" | Every backend: GLiNER, Transformers, OPF, Nemotron. |
| pip install "pii-firewall[gliner]" | Zero-shot NER, no fine-tuning. |
| pip install "pii-firewall[transformers]" | Biomedical NER (BioBERT, d4data). |
# Recommended
pip install "pii-firewall[presidio,langdetect]"
# Download spaCy models for the languages you use
python -m spacy download en_core_web_sm
python -m spacy download es_core_news_sm
python -m spacy download fr_core_news_sm