A professional CLI tool to detect and de-identify PII from CSV files.
Project description
PyRedact 🛡️
A professional, installable command-line tool to detect and de-identify Personally Identifiable Information (PII) from various file types.
Features
- Multi-Format Support: Scans
.csv,.pdf, and.txtfiles. - Comprehensive PII Detection: Detects a wide range of global and Indian-specific PII types.
- Flexible Input: Scan a single file or an entire directory of
.csvfiles. - Selective Scanning: Choose to scan for all PII types or only for specific ones.
- Professional CLI: A user-friendly interface with a startup banner, progress bars, a self-documenting
--helpmenu, and clear error messages. - Secure and Robust: Handles permission errors and various text encodings automatically.
Installation
It is highly recommended to create a dedicated folder and use a virtual environment for a clean and stable experience.
-
Create a Project Folder and Open a Terminal:
mkdir My-PII-Scans cd My-PII-Scans
-
Create and Activate a Virtual Environment:
python -m venv venv .\venv\Scripts\Activate.ps1
-
Install
pyredactfrom PyPI:pip install pyredact
(Note: To install a testing version, use the command
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pyredact)
Usage Guide
Once installed, use the pyredact command from your terminal.
Getting Help
To see a full list of all available commands and options, run:
pyredact --help
Example Scenarios
-
Scan a single PDF file and save to the default
output/folder:pyredact --input C:\Users\YourName\Documents\report.pdf
-
Scan all
.csvfiles in a specific directory:pyredact --input-dir path/to/your/folder_with_csvs
-
Scan a file for only Emails and PAN Cards:
pyredact --input data.csv --types "EMAIL,PAN_CARD"
-
Scan a file and save the results to a custom folder:
pyredact --input data.txt --output C:/My_Secure_Results
-
Scan a file with detailed, line-by-line logging:
pyredact --input sensitive_data.csv --verbose
-
Scan a file and overwrite any existing output without asking for confirmation:
pyredact --input sensitive_data.csv --force
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyredact_mv-1.0.0.tar.gz.
File metadata
- Download URL: pyredact_mv-1.0.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16b2d2c170381774b70080f8a57dae5c54e1e8bb2b3a5cb7966bf40e7020b52a
|
|
| MD5 |
50e1c0296af905d597020116e2dcdc80
|
|
| BLAKE2b-256 |
e24c965272bd8c306e8c64d9573693910b43b36b74df56392324a016e85bd9f5
|
File details
Details for the file pyredact_mv-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pyredact_mv-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
248352f6c033cd9195ba26e28fddd1c7555bebbf9cd3b1e216f2e7ef3b205c6a
|
|
| MD5 |
ec080221812e3f52418413656f69aeea
|
|
| BLAKE2b-256 |
ee79b46994721ed0b75c5b38eb5a0de73157fc4c7f64e6c1fc028282f5aaef76
|