Skip to main content

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 .txt files.
  • 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 .csv files.
  • 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 --help menu, 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.

  1. Create a Project Folder and Open a Terminal:

    mkdir My-PII-Scans
    cd My-PII-Scans
    
  2. Create and Activate a Virtual Environment:

    python -m venv venv
    .\venv\Scripts\Activate.ps1
    
  3. Install pyredact from 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 .csv files 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyredact_mv-1.0.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyredact_mv-1.0.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file pyredact_mv-1.0.1.tar.gz.

File metadata

  • Download URL: pyredact_mv-1.0.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pyredact_mv-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b8978c000b9c6fad31d62338dadb3bc90e9628a10e7839e9c3bc203782b9018a
MD5 bcfe443f6343e83dbd2cc06271985902
BLAKE2b-256 848f0886e742ac47b4138c3658a8a67a93c60a1ec110223b4089e36c8092a056

See more details on using hashes here.

File details

Details for the file pyredact_mv-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyredact_mv-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pyredact_mv-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8892f184672ef0eeffaf3664c7fd3c213128c43b5ff1103a61248ac75da25863
MD5 1cc0ff67f85a53078dcf1eacc360a5f6
BLAKE2b-256 13b64ee254fd2fc7df706dcbf900b560b6f4ee35fddf81acd96ef83bd67f72d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page