--- id: presidio-analyzer version: "2.2.364" license: MIT license_treatment: permissive maintenance: active --- # presidio-analyzer — Presidio Analyzer package License: permissive · Maintenance: active · Downloads: 6.8M/mo ## What it is and what it does Presidio Analyzer is a Python service that scans unstructured text to find and identify personally identifiable information (PII) such as phone numbers, email addresses, and other sensitive data. It comes with a set of predefined recognizers that use regex, spaCy-based named entity recognition, and other detection logic to identify PII entities. The package can be extended with custom recognizers for domain-specific or specialized PII types. The analyzer supports both traditional pattern-based detection and modern language model-based approaches. For LLM-based detection, it integrates with Ollama (for local, privacy-preserving deployments) and Azure OpenAI (for cloud-based detection). The core engine loads a spaCy NLP model by default and orchestrates multiple recognizers to produce a comprehensive analysis of detected entities in a given text. Use it for: - Scan customer support tickets or chat logs to identify and redact PII before storage or sharing. - Validate data pipelines to ensure sensitive information is not leaked in logs or exported datasets. - Build privacy-compliance workflows that detect PII in documents before they are processed or archived. - Extend with custom recognizers to detect domain-specific sensitive data (e.g., medical record numbers, financial account identifiers). - Deploy locally via Ollama for on-premise PII detection without sending text to external APIs. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Detects personally identifiable information (PII) entities in text using regex, named entity recognition, and language models, with support for custom recognizers and multiple LLM providers. Yes. Presidio Analyzer is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and offers low-friction installation. It solves a concrete privacy problem with both out-of-the-box recognizers and extensibility for custom needs. The choice between pattern-based and LLM-based detection gives flexibility for different accuracy and privacy trade-offs. ## Install pip install presidio-analyzer uv add presidio-analyzer poetry add presidio-analyzer ## Installing presidio-analyzer Before you install: Low friction installation with a wheel distribution. Active maintenance with a recent release (23 days old) and strong repository activity (10483 stars). Supports modern Python versions (3.10–3.14). License in practice: MIT license (permissive) allows free use, modification, and distribution with minimal restrictions, making it suitable for commercial and open-source projects. Quickstart: pip install presidio-analyzer from presidio_analyzer import AnalyzerEngine analyzer = AnalyzerEngine() results = analyzer.analyze( text="My phone number is 212-555-5555", entities=["PHONE_NUMBER"], language='en' ) print(results) Requires spaCy NLP model to be downloaded; the AnalyzerEngine loads it by default on first use. For GPU acceleration on Linux with NVIDIA, cupy-cuda12x or matching CUDA version must be installed separately. Verify before relying: - Whether predefined recognizers cover all common PII entity types or if custom recognizers are required for specific use cases. - Performance characteristics (latency, throughput) for large-scale text analysis. - Whether LangExtract recognizers (Ollama, Azure OpenAI) require additional setup beyond the base install. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 6.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags PII detection in text, personally identifiable information recognition, named entity recognition NER, data privacy scanning, sensitive data detection, PII analyzer, text privacy masking, pii-detection, privacy-compliance, nlp [View on SkillFed](https://skillfed.io/packages/presidio-analyzer) · [View on PyPI](https://pypi.org/project/presidio-analyzer/)