flexorch-audit is an open-source library that detects PII, masks sensitive text, and scores document quality — entirely on your own machine. It makes no API calls and requires no FlexOrch account, so your data never leaves your infrastructure.
Features
- PII detection — 46 types across TR, EU, and US jurisdictions
- Text masking — 4 strategies:
redact,replace,token, andhash - Quality metrics — grade (A–D), numeric score, noise ratio, and language detection
- Compliance summary — KVKK / GDPR risk categories via
compliance_report() - LLM preparation —
redact_for_llm()one-liner that detects and masks in a single call - LangChain & LlamaIndex — drop-in loaders with built-in quality filtering
- Zero dependencies — pure Python / pure JavaScript, no heavy ML models required
Quick example
Relationship to the FlexOrch platform
flexorch-audit is the core detection engine that powers the FlexOrch platform. When you use the platform, you get everything in this library plus:
- Structured extraction for 9 document types
- Managed async pipeline with job history
- Dataset building and export
- Cloud connectors (S3, GCS, Azure Blob)
- Full GDPR Article 30 ROPA and NIS2 audit export
- Team management and access controls
flexorch-audit when you want detection inside your own pipeline. Use the FlexOrch platform when you want the full managed workflow without building it yourself.
Packages
flexorch-audit on PyPI
Python 3.10+ ·
pip install flexorch-audit@flexorch/audit on npm
Node 18+ ·
npm install @flexorch/auditExplore the docs
Installation
Install the library and run your first audit in under two minutes.
Masking
Replace PII with redacted labels, tokens, synthetic values, or hashes.
Compliance Report
Generate a local KVKK / GDPR risk summary from detected findings.
LangChain Integration
Load quality-filtered, PII-masked documents into your LangChain chain.
LlamaIndex Integration
Feed privacy-safe documents into a LlamaIndex vector index.