Skip to main content

Pii Extractor plugin: regex

This repository builds a Python package that installs a pii-extract-base plugin to performs PII detection for text data based on regular expressions (with optional context). The name of the plugin entry point is piisa-detectors-regex.

The PII Tasks in the package are structured by language & country, since many of the PII elements are language- and/or -country dependent.

Requirements

The package

  • needs at least Python 3.8
  • needs the pii-data and the pii-extract-base base packages
  • uses the regex package (instead of the standard re package in the core Python library)
  • uses the python-stdnum package to validate many identifiers (and the python-phonenumbers to validate phone numbers)

Usage

The package does not have any user-facing entry points, and it is used automatically by the PIISA framework.

Building

The provided Makefile can be used to process the package:

  • make pkg will build the Python package, creating a file that can be installed with pip
  • make unit will launch all unit tests (using pytest, so pytest must be available)
  • make install will install the package in a Python virtualenv. The virtualenv will be chosen as, in this order:
    • the one defined in the VENV environment variable, if it is defined
    • if there is a virtualenv activated in the shell, it will be used
    • otherwise, a default is chosen as /opt/venv/bigscience (it will be created if it does not exist)

Contributing

To add a new PII processing task, please see the contributing instructions.

Metadata

Release files for pii-extract-plg-regex 0.5.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 pii-extract-plg-regex 0.5.1
File Size Uploaded
pii-extract-plg-regex-0.5.1.tar.gz 24.1 kB Details

Release files / pii-extract-plg-regex-0.5.1.tar.gz

Download URL pii-extract-plg-regex-0.5.1.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1ff882fa5a36c39633aa93c38731869acecd5f71bbecc46c856e2219b07d1d85
BLAKE2b-256 checksum
How to use checksums
ab8168ee28e00787824e53f0f00c81eec7d5cdd3ef160889dd7524d1f3632112
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.5.1 This release

1 release file

0.5.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.0.2

1 release file

0.0.1

1 release file

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