Skip to main content

Secure anonymization/de-anonymization library for PII data

Project description

Anonymask Python Package

This package provides Python bindings for the Anonymask core library, enabling secure anonymization and de-anonymization of PII data.

Installation

pip install anonymask

Building from Source

  1. Ensure you have Rust and Python installed.
  2. Clone the repository and navigate to the anonymask-py directory.
  3. Install dependencies:
pip install maturin
  1. Build the package:
maturin build --release --sdist

This will compile the Rust code and generate the Python wheel.

Usage

from anonymask import Anonymizer

anonymizer = Anonymizer(['email', 'phone'])
result = anonymizer.anonymize('Contact john@email.com or call 555-123-4567')

print(result[0])  # "Contact EMAIL_xxx or call PHONE_xxx"
print(result[1])  # {'EMAIL_xxx': 'john@email.com', 'PHONE_xxx': '555-123-4567'}

Publishing to PyPI

  1. Ensure you have a PyPI account and are configured (use ~/.pypirc or environment variables).
  2. Update the version in pyproject.toml.
  3. Build the package: maturin build --release.
  4. Publish: maturin publish.

Note: Maturin handles the build and upload process. Make sure to have your PyPI credentials set up.

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

anonymask-0.3.2.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

anonymask-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

File details

Details for the file anonymask-0.3.2.tar.gz.

File metadata

  • Download URL: anonymask-0.3.2.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for anonymask-0.3.2.tar.gz
Algorithm Hash digest
SHA256 cd0831cad74e44a0ce65ee20b30611d805beee01141521c103fa36aeb0eb8605
MD5 8c9ca932fe8a5fa91a1396c4d87a324e
BLAKE2b-256 7c8f3a73c2ff3265ece6adc7190e8934e2683efa333a0c89d63108aa3626592f

See more details on using hashes here.

File details

Details for the file anonymask-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for anonymask-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d2793f0b0118c24c2f1bfa1b958ee81d03f069d65b67e57b897ff541c8eeb2a5
MD5 e3d659170af7b72d62caef959659bd17
BLAKE2b-256 8e45c4b78c2a64f69f5e4caac0e5261b9eeec5b4024a8b970834544d7f2518d8

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