Privacy-First Vector Database for Sensitive Data
Project description
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
pip install lexiredact
Optional extras:
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
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
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 lexiredact-0.1.0.tar.gz.
File metadata
- Download URL: lexiredact-0.1.0.tar.gz
- Upload date:
- Size: 39.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b70563668b2760c8a982f42f25a2c7b027ad2aa3bce34ed5e16268015da71953
|
|
| MD5 |
791077be7e18e9b392fb5bea4e107d18
|
|
| BLAKE2b-256 |
769a37d13bbfd94ff49a740e72b5c7dd421e7178826c11f652db00966aa6bea1
|
File details
Details for the file lexiredact-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lexiredact-0.1.0-py3-none-any.whl
- Upload date:
- Size: 51.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a4610bd0ee7875db682088bd75532111d0498bb758e1ea4595c757fdbdcf63b
|
|
| MD5 |
cff5d310dea68d5f3cf386f0827bc27f
|
|
| BLAKE2b-256 |
bcdcbb14d6421bcd6f0e70a28ae3d78f0b4f892f9185121c1555bb826cd53dac
|