Data
pii-sweep
Scan datasets for PII before sharing them.
Install
pip install pii-sweepIf you use uv, also as an isolated CLI:
uv tool install pii-sweepTry it in your browser
Hi, I am Ana Garcia. You can write to ana.garcia@example.comemail
or call me at +34 612 345 678phone. My ID number is 12345678ZDNI/NIE and the company
IBAN is ES91 2100 0418 4502 0005 1332IBAN.
4matches
1email
1phone
1DNI/NIE
1IBAN
The same regex families the CLI uses for its high-signal detectors, running locally. Nothing is sent anywhere.
What it does
Before a dataset is shared, copied to a notebook or pushed to a bucket, it is worth knowing whether a column holds emails, card numbers or IDs. pii-sweep samples each column and reports which look like PII and how strongly.
In action
A real recorded session of the CLI running.
Read it as text
severity column type confidence medium email email 100% medium phone phone 100%
$ pii-sweep scan users.csv
severity column type confidence
medium email email 100%
medium phone phone 100%Features
- —Checksum detectors: cards (Luhn), IBAN (mod-97), SSN.
- —Email, phone and IPv4, grouped by severity.
- —Confidence per column and a configurable threshold.
- —CI gate; reads CSV, Parquet and JSONL.