Metadata-Version: 2.5
Name: aegis-gateway-pack-pii
Version: 2.0.0a5
Summary: Aegis policy pack: PII masking and unmasking with Microsoft Presidio.
Project-URL: Homepage, https://e-choness.github.io/aegis/
Project-URL: Documentation, https://e-choness.github.io/aegis/
Project-URL: Repository, https://github.com/e-choness/aegis
Project-URL: Changelog, https://e-choness.github.io/aegis/changelog
Project-URL: Issues, https://github.com/e-choness/aegis/issues
Author: Aegis contributors
License-Expression: AGPL-3.0-or-later
License-File: LICENSE
Keywords: ai-gateway,audit,governance,guardrails,llm,openai,pii
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Security
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: aegis-gateway-core==2.0.0a5
Provides-Extra: all
Requires-Dist: presidio-analyzer>=2.2; extra == 'all'
Requires-Dist: presidio-anonymizer>=2.2; extra == 'all'
Requires-Dist: spacy<3.9,>=3.8.0; extra == 'all'
Provides-Extra: pii
Requires-Dist: presidio-analyzer>=2.2; extra == 'pii'
Requires-Dist: presidio-anonymizer>=2.2; extra == 'pii'
Requires-Dist: spacy<3.9,>=3.8.0; extra == 'pii'
Description-Content-Type: text/markdown

# aegis-gateway-pack-pii

PII masking for Aegis, powered by Microsoft Presidio. In `mask` mode the
model never sees personal data: entities become placeholders on the way in
and are restored on the way out.

```yaml
guardrails:
  pii:
    pack: aegis.pii
    mode: mask        # or: detect — block requests containing PII
    threshold: 0.4    # minimum confidence (default)
    allow_list: [Aegis]
    # entities: [PERSON, EMAIL_ADDRESS, PHONE_NUMBER, CA_SIN]  — or ALL
pipeline:
  ingress: [pii]
  egress: [pii]
```

By default only identifying entities are masked (names, contact details,
account and government IDs — including Canadian SINs); noisy types such as
dates and URLs are opt-in.

Needs the spaCy model: `python -m spacy download en_core_web_sm`.
See [PII masking](https://e-choness.github.io/aegis/packs/pii).

## Links

- [Documentation](https://e-choness.github.io/aegis/) · [Changelog](https://e-choness.github.io/aegis/changelog) · [Source](https://github.com/e-choness/aegis)
- Most users want the umbrella package: `pip install aegis-gateway`.

Part of [Aegis](https://pypi.org/project/aegis-gateway/), a self-hosted AI gateway. Licensed under [AGPL-3.0-or-later](https://github.com/e-choness/aegis/blob/main/LICENSE).
