anonLLM: Anonymize Personally Identifiable Information (PII) for Large Language Model APIs
anonLLM is a Python package designed to anonymize personally identifiable information (PII) in text data before it's sent to Language Model APIs like GPT-3. The goal is to protect user privacy by ensuring that sensitive data such as names, email addresses, and phone numbers are anonymized.
Features
Anonymize names Anonymize email addresses Anonymize phone numbers Support for multiple country-specific phone number formats Reversible anonymization (de-anonymization) Installation
To install anonLLM, run:
pip install anonLLM
Quick Start
Here's how to get started with anonLLM:
from anonLLM.llm import OpenaiLanguageModel
from dotenv import load_dotenv
load_dotenv()
# Anonymize a text
text = "Write a CV for me: My name is Alice Johnson, "\
"email: alice.johnson@example.com, phone: +1 234-567-8910."\
"I am a machine learning engineer."
# Anonymization is handled under the hood
llm = OpenaiLanguageModel()
response = llm.generate(text)
print(response)
In this example, the response will contain the correct name provided. At the same time, no PII will be sent to OpenAI.
Contributing
We welcome contributions!
License
This project is licensed under the MIT License.
Metadata
Release files for anonLLM 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anonLLM-0.1.10.tar.gz | 6.2 kB | Without provenance | Details for anonLLM-0.1.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anonLLM-0.1.10-py3-none-any.whl | Python 3 | none | any | Details for anonLLM-0.1.10-py3-none-any.whl |
Total release size: 11.6 kB
Release files / anonLLM-0.1.10.tar.gz
| Download URL | anonLLM-0.1.10.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f02bdd4aa43efbd25ab9c39318039444235f57e6a48db6ae5c3c4ee88402b9f
|
|
BLAKE2b-256 checksum How to use checksums |
fe055408f034fa8d072283bbeaae6400d2d0d42d5e30ed3087420951a2d40238
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / anonLLM-0.1.10-py3-none-any.whl
| Download URL | anonLLM-0.1.10-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d9f541b188a4b6bcda4c41261028abba46184ca49dcba258c25066074c10620
|
|
BLAKE2b-256 checksum How to use checksums |
d40f5a0ef843ca873b5ec79873d347d2dbbe97897f068fe9f14f9a86986d8511
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for anonLLM 0.1.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.