Skip to main content

Detection and redaction of PII using GLiNER

Project description

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])

entities = scanner.get_pii(text)

text_redacted = scanner.redact(text)

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

blankit-0.1.2.tar.gz (54.2 kB view details)

Uploaded Source

Built Distribution

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

blankit-0.1.2-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file blankit-0.1.2.tar.gz.

File metadata

  • Download URL: blankit-0.1.2.tar.gz
  • Upload date:
  • Size: 54.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.7

File hashes

Hashes for blankit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4e334338f6ea12fee3319f17d9159a42fea71d82eae92b44c4efe547812693ab
MD5 31dfcde7263778d01f3678e6b67f7388
BLAKE2b-256 209f2af718342c2cabd427c7b752e22143c7e129fdb4c98cf6403f12b8df3a1c

See more details on using hashes here.

File details

Details for the file blankit-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: blankit-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.7

File hashes

Hashes for blankit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e0839115c203df89fa585be0de91167b3242a24b19ff881e230dac462a19fd33
MD5 5d6f4fd7cd8a3579a942a5e52b529d50
BLAKE2b-256 e6f8293565d93912532ee604e98cd57abda2d43f138b13713c085efd757f135d

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