Metadata-Version: 2.4
Name: lexiredact
Version: 0.1.0
Summary: Privacy-First Vector Database for Sensitive Data
Author-email: Shwetan Londhe <shwetan.college@gmail.com>, Varad Limbkar <varadlimbkar@gmail.com>, Baihela Husain <baihelahusain@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/lexiredact/lexiredact
Project-URL: Repository, https://github.com/lexiredact/lexiredact
Project-URL: Documentation, https://github.com/lexiredact/lexiredact#documentation
Project-URL: Issues, https://github.com/lexiredact/lexiredact/issues
Keywords: pii,privacy,vector-database,embedding,rag
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: presidio-analyzer>=2.2.0
Requires-Dist: presidio-anonymizer>=2.2.0
Requires-Dist: fastembed>=0.2.0
Requires-Dist: chromadb>=0.4.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: numpy>=1.24.0
Provides-Extra: pdf
Requires-Dist: pypdf>=4.0.0; extra == "pdf"
Provides-Extra: redis
Requires-Dist: redis[async]>=5.0.0; extra == "redis"
Provides-Extra: mlflow
Requires-Dist: mlflow>=2.10.0; extra == "mlflow"
Provides-Extra: all
Requires-Dist: pypdf>=4.0.0; extra == "all"
Requires-Dist: redis[async]>=5.0.0; extra == "all"
Requires-Dist: mlflow>=2.10.0; extra == "all"
Dynamic: license-file

# LexiRedact

LexiRedact is a Python package for privacy-first document ingestion in RAG and vector database workflows. It detects PII, redacts sensitive text before storage, and preserves retrieval quality by generating embeddings from the original text while storing only sanitized content.

## Install

```bash
pip install lexiredact
```

Optional extras:

```bash
pip install "lexiredact[pdf]"
pip install "lexiredact[redis]"
pip install "lexiredact[mlflow]"
pip install "lexiredact[all]"
```

## What It Focuses On

- PII detection with Presidio
- safe redaction before vector-store persistence
- configurable ingestion pipeline components
- operational metrics for privacy and latency
- optional retrieval evaluation helpers for model comparison

## Quick Start

```python
import asyncio
import lexiredact as lr


async def main() -> None:
    pipeline = lr.IngestionPipeline()
    await pipeline.initialize()

    result = await pipeline.process_document(
        lr.Document(
            id="doc-1",
            text="Contact Jane Doe at jane@example.com or 555-0101",
            metadata={"source": "demo"},
        )
    )

    print(result.clean_text)
    print(result.pii_entities)

    await pipeline.shutdown()


asyncio.run(main())
```

## Docs And Examples

- docs: [`docs/`](./docs)
- examples: [`examples/`](./examples)
