Skip to main content

scrubadub

Remove personally identifiable information from free text. Sometimes we have additional metadata about the people we wish to anonymize. Other times we don’t. This package makes it easy to seamlessly scrub personal information from free text, without compromising the privacy of the people we are trying to protect.

scrubadub currently supports removing:

  • Names

  • Email addresses

  • Addresses/Postal codes (US, GB, CA)

  • Credit card numbers

  • Dates of birth

  • URLs

  • Phone numbers

  • Username and password combinations

  • Skype/twitter usernames

  • Social security numbers (US and GB national insurance numbers)

  • Tax numbers (GB)

  • Driving licence numbers (GB)

Build Status Version Downloads Test Coverage Documentation Status

Quick start

Getting started with scrubadub is as easy as pip install scrubadub and incorporating it into your python scripts like this:

>>> import scrubadub

# My cat may be more tech-savvy than most, but he doesn't want other people to know it.
>>> text = "My cat can be contacted on example@example.com, or 1800 555-5555"

# Replaces the phone number and email addresse with anonymous IDs.
>>> scrubadub.clean(text)
'My cat can be contacted on {{EMAIL}}, or {{PHONE}}'

There are many ways to tailor the behavior of scrubadub using different Detectors and PostProcessors. Scrubadub is highly configurable and supports localisation for different languages and regions.

Installation

To install scrubadub using pip, simply type:

pip install scrubadub

There are several other packages that can optionally be installed to enable extra detectors. These scrubadub_address, scrubadub_spacy and scrubadub_stanford, see the relevant documentation (address detector documentation and name detector documentation) for more info on these as they require additional dependencies. This package requires at least python 3.6. For python 2.7 or 3.5 support use v1.2.2 which is the last version with support for these versions.

New maintainers

LeapBeyond are excited to be supporting scrubadub with ongoing maintenance and development. Thanks to all of the contributors who made this package a success, but especially @deanmalmgren, IDEO and Datascope.

Metadata

Release files for cs-scrubadub 2.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cs-scrubadub 2.1.1
File Size Uploaded
cs_scrubadub-2.1.1.tar.gz 44.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cs-scrubadub 2.1.1
File Interpreter ABI Platform
cs_scrubadub-2.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 108.2 kB

Release files / cs_scrubadub-2.1.1.tar.gz

Download URL cs_scrubadub-2.1.1.tar.gz
Size 44.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fbbc879a7bbc5f3f3d95707eaddfd01baac11b96ce11f37f06959c49dec8e2f5
BLAKE2b-256 checksum
How to use checksums
c191fee02c3e8c221c88c7f335c76ecb8f557b9e7b6ded709e775190884cfdb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / cs_scrubadub-2.1.1-py3-none-any.whl

Download URL cs_scrubadub-2.1.1-py3-none-any.whl
Size 64.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02e00d6bf2e77ca48271bf04cec790f7a5aff37dd007f0d46799e816599bfaf0
BLAKE2b-256 checksum
How to use checksums
fb64d3d08010c19947ea465c42a251b2b023c2dff8d4a12d937be0f6fc2b8a77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release history Release notifications | RSS feed

This release

2.1.1 This release

2 release files

2.1.0

2 release files

2.0.4

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page