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
- Ensure you have Rust and Python installed.
- Clone the repository and navigate to the
anonymask-pydirectory. - Install dependencies:
pip install maturin
- 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
- Ensure you have a PyPI account and are configured (use
~/.pypircor environment variables). - Update the version in
pyproject.toml. - Build the package:
maturin build --release. - Publish:
maturin publish.
Note: Maturin handles the build and upload process. Make sure to have your PyPI credentials set up.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anonymask-0.2.0.tar.gz.
File metadata
- Download URL: anonymask-0.2.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b26421b2c33470b4e2d5b707ad3390114c8fed8832c1201e83ff4ff0b06e14c7
|
|
| MD5 |
d1c9f4d8f32b29573fce4355a718ef89
|
|
| BLAKE2b-256 |
760a906e38d552bb8ab8960450c9660873b8984a3a247fe477cbf50587fe3396
|
File details
Details for the file anonymask-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: anonymask-0.2.0-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48dbf228b88157df749ddc579470bdfb9c1e249e0be1d0ee1225806c356a0e99
|
|
| MD5 |
959de0a21d2f83fa5324fe0471e7d4d5
|
|
| BLAKE2b-256 |
b378ca3d786fe20b64e47cfb22ba988082f5e7a1cad677d5ed767e14f39b0909
|