skillfed

argus-redact

Encrypt PII, not meaning. Locally.

argus-redact v0.8.14 89.6K downloads/30d#13,644 on PyPI10
Permissive license Apache-2.0 Active released

What it is and what it does

argus-redact is a local PII detection and pseudonymization library designed to sit between user input and large language models. It scans text through up to three collaborative layers—fast regex matching, statistical NER, and optional local LLM inference—to identify sensitive data (names, phone numbers, ID numbers, medical terms, and 78 other PII types) and replace them with reversible pseudonyms. Each call generates fresh random keys, so the same original data produces different pseudonyms every time, protecting against fixed-pseudonym deanonymization attacks.

The library preserves semantic meaning: names become codes like 'P-83811', phone numbers show partial digits ('138****5678'), and ID numbers become type-prefixed codes ('ID-03292'). You can restore the original text verbatim using the per-message key, or let the LLM work with pseudonymized data. Three deployment modes trade latency for detection depth: 'fast' (sub-millisecond, regex only), 'ner' (10–100ms, adds entity recognition), and 'auto' (20s, includes local LLM). Chinese receives deepest support; English, Japanese, Korean, German, Ukrainian, and Indonesian add regex plus NER; Brazilian Portuguese is regex-only.

Use it for:

  • Redact user queries before sending to a third-party LLM API, then restore the response in a guarded round-trip to keep PII local.
  • Audit text for privacy risk before it enters a data pipeline, using the risk-scoring API to flag documents with critical or high-severity PII.
  • Preprocess customer support tickets or medical notes for internal AI analysis while ensuring sensitive fields never cross the network boundary.
  • Generate synthetic training data by redacting real documents and replacing pseudonyms with plausible alternatives, preserving linguistic patterns.
  • Implement a privacy gateway that runs 'fast' mode inline for low-latency LLM proxies and 'auto' mode asynchronously in a parallel audit lane.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Detects and redacts personally identifiable information (PII) in text using regex, NER, and optional local LLM layers, replacing sensitive data with reversible pseudonyms while preserving meaning for downstream AI systems.

Yes, with conditions. Install if you need reversible, per-message-key pseudonymization for LLM pipelines and can tolerate medium install friction. Actively maintained, Apache-2.0 licensed, no known vulnerabilities. Do not rely on it as a compliance anonymization tool—it is a data minimization aid. Fast mode will miss obfuscated or novel PII variants; NER and LLM modes are statistical. Restore without a guarded anchor is not secure. Best for workflows where you control both redaction and restoration.

Install

argus-redact on PyPI

pip

pip install argus-redact

uv

uv add argus-redact

poetry

poetry add argus-redact

Installing argus-redact

Before you install

Medium install friction: compiled wheels available for Python 3.10–3.12 across macOS, Linux, and Windows. Depends on pyyaml and requests. Active maintenance with latest release on 2026-08-14.

License in practice

Apache-2.0 (permissive): you can use, modify, and distribute freely in commercial and private projects, provided you include a copy of the license and state material changes.

Quickstart

pip install argus-redact

from argus_redact import redact

redacted, key = redact(
    "My phone is 13812345678 and ID is 110101199003074610",
    lang="en"
)
print(redacted)
print(key)

Requires Python 3.10 or later. The 'auto' mode is computationally expensive (~20s per document) and unsuitable for interactive request paths.

Verify before relying

  • Exact performance and miss rates for English PII detection versus the Chinese benchmarks cited in the description.
  • Whether the 'restore' function's guarded mode (default as of v0.8.0) is sufficient for production security in adversarial settings.
  • How well NER generalizes to informal, typo-heavy, or minority-language names outside documented language support.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies 2 — pyyaml, requests
Maintenance actively maintained — 0 days since the last release
Last repo commit
First released
Downloads 89,615/month — #13,644 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: argus_redact-0.8.14-cp310-cp310-macosx_10_12_x86_64.whl; argus_redact-0.8.14-cp310-cp310-macosx_11_0_arm64.whl; argus_redact-0.8.14-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; argus_redact-0.8.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; argus_redact-0.8.14-cp310-cp310-musllinux_1_2_aarch64.whl; argus_redact-0.8.14-cp310-cp310-musllinux_1_2_x86_64.whl; argus_redact-0.8.14-cp310-cp310-win_amd64.whl; argus_redact-0.8.14-cp311-cp311-macosx_10_12_x86_64.whl; argus_redact-0.8.14-cp311-cp311-macosx_11_0_arm64.whl; argus_redact-0.8.14-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; argus_redact-0.8.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; argus_redact-0.8.14-cp311-cp311-musllinux_1_2_aarch64.whl; argus_redact-0.8.14-cp311-cp311-musllinux_1_2_x86_64.whl; argus_redact-0.8.14-cp311-cp311-win_amd64.whl; argus_redact-0.8.14-cp312-cp312-macosx_10_12_x86_64.whl; argus_redact-0.8.14-cp312-cp312-macosx_11_0_arm64.whl; argus_redact-0.8.14-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; argus_redact-0.8.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; argus_redact-0.8.14-cp312-cp312-musllinux_1_2_aarch64.whl; argus_redact-0.8.14-cp312-cp312-musllinux_1_2_x86_64.whl

Keywords: pii, redact, privacy, llm, anonymization

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: SecurityTopic :: Text Processing

Tags

PII redaction for LLM pipelinesreversible pseudonymizationlocal privacy layerencrypt PII before sending to AIdetect and mask sensitive dataChinese name and ID redactionprivacy-preserving text preprocessing
pii-detectionllm-privacyreversible-pseudonymization

More Text Processing packages

Further reading