← Back to DAGDA | Support | Source: https://github.com/shadowmodder/pii-redactor
Skip to content

About

A small, dependency-free PII scrubber for text, logs, and LLM prompts/outputs. Catches emails, phone numbers,

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

pii-redactor

A small, dependency-free PII scrubber for text, logs, and LLM prompts/outputs. Catches emails, phone numbers, SSNs, IPv4 addresses, and credit-card numbers — with Luhn validation so random 16-digit IDs don't get flagged as cards.

Install

pip install -e .

Usage

from piiredactor import redact, find

redact("Email a@b.com, SSN 123-45-6789, card 4111 1111 1111 1111")
# 'Email [REDACTED], SSN [REDACTED], card [REDACTED]'

find("ip 10.0.0.1 mail x@y.io")
# [{'type': 'ipv4', ...}, {'type': 'email', ...}]

Overlapping matches are resolved to non-overlapping spans. MIT licensed.

About

A small, dependency-free PII scrubber for text, logs, and LLM prompts/outputs. Catches emails, phone numbers,

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages