Metadata-Version: 2.1
Name: anonLLM
Version: 0.1.7
Summary: Anonymizes personally identifiable information for Large Language Model APIs
Home-page: https://github.com/fsndzomga/anonLLM
Author: FS Ndzomga
Author-email: ndzomgafs@gmail.com
Project-URL: Bug Tracker, https://github.com/fsndzomga/anonLLM/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: aiohttp <3.9,>=3.8
Requires-Dist: aiosignal <1.4,>=1.3
Requires-Dist: annotated-types <0.6,>=0.5
Requires-Dist: async-timeout <4.1,>=4.0
Requires-Dist: attrs <24.0,>=23.1
Requires-Dist: blis <0.8,>=0.7
Requires-Dist: catalogue <2.1,>=2.0
Requires-Dist: certifi <2024.0,>=2023.7
Requires-Dist: charset-normalizer <3.3,>=3.2
Requires-Dist: click <8.2,>=8.1
Requires-Dist: confection <0.2,>=0.1
Requires-Dist: cymem <2.1,>=2.0
Requires-Dist: Faker <20.0,>=19.5
Requires-Dist: frozenlist <1.5,>=1.4
Requires-Dist: idna <3.5,>=3.4
Requires-Dist: Jinja2 <3.2,>=3.1
Requires-Dist: langcodes <3.4,>=3.3
Requires-Dist: MarkupSafe <2.2,>=2.1
Requires-Dist: multidict <6.1,>=6.0
Requires-Dist: murmurhash <1.1,>=1.0
Requires-Dist: numpy <1.26,>=1.25
Requires-Dist: openai <0.29,>=0.28
Requires-Dist: packaging <24.0,>=23.1
Requires-Dist: pathy <0.11,>=0.10
Requires-Dist: pip <22.4,>=22.3
Requires-Dist: preshed <3.1,>=3.0
Requires-Dist: pydantic <2.4,>=2.3
Requires-Dist: pydantic-core <2.7,>=2.6
Requires-Dist: python-dateutil <2.9,>=2.8
Requires-Dist: python-dotenv <1.1,>=1.0
Requires-Dist: regex <2023.9,>=2023.8
Requires-Dist: requests <2.32,>=2.31
Requires-Dist: setuptools <65.6,>=65.5
Requires-Dist: six <1.17,>=1.16
Requires-Dist: smart-open <6.5,>=6.4
Requires-Dist: spacy <3.7,>=3.6
Requires-Dist: spacy-legacy <3.1,>=3.0
Requires-Dist: spacy-loggers <1.1,>=1.0
Requires-Dist: srsly <2.5,>=2.4
Requires-Dist: thinc <8.2,>=8.1
Requires-Dist: tiktoken <0.5,>=0.4
Requires-Dist: tqdm <4.67,>=4.66
Requires-Dist: typer <1.0,>=0.9
Requires-Dist: typing-extensions <4.8,>=4.7
Requires-Dist: urllib3 <2.1,>=2.0
Requires-Dist: wasabi <1.2,>=1.1
Requires-Dist: yarl <1.10,>=1.9
Provides-Extra: dev
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: flake8 ; extra == 'dev'

# anonLLM: Anonymize Personally Identifiable Information (PII) for Large Language Model APIs

![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)

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:

```bash
pip install anonLLM
```

# Quick Start

Here's how to get started with anonLLM:

```python
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.
