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.1.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.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: blankit-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 1621f64bf6c842bfd75822e7ace757314c00dbe91fd826eb596abcbc79a6db38
MD5 38421f1d43f381303d6d38ad47484645
BLAKE2b-256 6ae87e4120ccbd9b97b5849c4917ff0ed1862987a0a355736613e5f174b6a061

See more details on using hashes here.

File details

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

File metadata

  • Download URL: blankit-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c391e0a3c0a7e049bdf32123f5bb1c615e36968bbb5de17d9c8e9422b137cff0
MD5 01e81934e1ab834ca85c871dde293157
BLAKE2b-256 a11c35fd6558231c61948354173d0e298c9d5f44c5395efa1328feb2af5e9773

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