Skip to main content

blankit: PII detection and removal in python

A lightweight package for detecting and removing Personally Identifiable Information (PII).

blankit currently uses GLiNER as a backend to remove different types of PII

PII types

Due to the versatility of GLiNER, blankit can essentially detect any PII type, though by default it supports the following:

  • Name
  • Location
  • Ethnicity
  • Gender
  • Business Name
  • Email address
  • Phone number

However, you can specify your own PII types for more bespoke applications if needed.

Getting started

Installation

Install the package either from this repo or via your favourite package manager, such as conda or uv

uv add blankit

Detecting PII

Detect and remove PII as follows:

from blankit.scanner import Scanner

text = "My name's gary and i live in fairfield with bruz and mugsy"

scanner = Scanner(pii_types=['Name', 'Location'])

# extract all the pii
entities = scanner.find_pii(text)

# remove pii from the text
text_redacted = scanner.redact(text)

Release files for blankit 0.2.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 blankit 0.2.1
File Size Uploaded
blankit-0.2.1.tar.gz 55.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for blankit 0.2.1
File Interpreter ABI Platform
blankit-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 58.9 kB

Release files / blankit-0.2.1.tar.gz

Download URL blankit-0.2.1.tar.gz
Size 55.2 kB
Tags Source
SHA-256 checksum
How to use checksums
26d5db1b0be39018f904d56062bc2bcba9382c7b8f95f21ecd98b7c582be87e8
BLAKE2b-256 checksum
How to use checksums
c4bac7f04014cd884d6254a0662ca4791fe35c7084a1cbc25dab1ee5229add9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.7

Release files / blankit-0.2.1-py3-none-any.whl

Download URL blankit-0.2.1-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8b8520f3996429d3d1a8920b825b8a9d31bfef42bed8f7715eb1175bf7a600c
BLAKE2b-256 checksum
How to use checksums
ecddb6ec66954396ba6694228af83be982cb71fdce4145882afc0df5d7d6928c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.7

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.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