Skip to main content

mobiusguard-redact

Streaming redaction for LLM output. It rewrites secrets and personal data in text that arrives in chunks, including a secret split across two chunks, without stopping the stream and without buffering the whole reply. Part of Mobius Guard. Alpha: the API may still change before 1.0.

from mobiusguard_redact import StreamRedactor

r = StreamRedactor()  # curated patterns + all gitleaks rules
for chunk in llm_stream:  # e.g. "my key is AKIA", "QWERTYUIOPASDFGH ok"
    send(r.feed(chunk))  # emits text as soon as it is safe
send(r.flush())  # "my key is [REDACTED:aws_access_key_id] ok"
r.findings  # pattern IDs and positions, never the secrets
  • Same output however the text is split. For every shipped pattern, property tests check this at every split point.
  • About one word of delay. Only text where a secret might be starting is held back.
  • Patterns: 24 curated (API keys, tokens, private keys, emails, payment cards with Luhn, IBAN, US SSN, Aadhaar with Verhoeff, PAN, phone numbers) plus all 221 regex rules from gitleaks v8.30.1 with its entropy and allowlist checks. Drop any by ID: default_patterns(exclude={"generic-api-key"}).
  • Also redact(text), redact_stream(iterable) and aredact_stream(async_iterable).

Guide, pattern list and limits: docs/redaction.md. How it works: decision 0007.

Metadata

Release files for mobiusguard-redact 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mobiusguard-redact 0.1.0
File Size Uploaded Provenance Actions
mobiusguard_redact-0.1.0.tar.gz 47.8 kB Without provenance Details for mobiusguard_redact-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mobiusguard-redact 0.1.0
File Interpreter ABI Platform Actions
mobiusguard_redact-0.1.0-py3-none-any.whl Python 3 none any Details for mobiusguard_redact-0.1.0-py3-none-any.whl

Total release size: 90.2 kB

Release files / mobiusguard_redact-0.1.0.tar.gz

Download URL mobiusguard_redact-0.1.0.tar.gz
Size 47.8 kB
Tags Source
SHA-256 checksum
How to use checksums
635de958bc13435df39b1ec617c54c4095f236ea769ca85e113ca9117a5fae60
BLAKE2b-256 checksum
How to use checksums
e39d70036232a7331ebc86b3f54c335a73e6e28f8f811fc18b6650dfc3eee261
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mobiusguard_redact-0.1.0-py3-none-any.whl

Download URL mobiusguard_redact-0.1.0-py3-none-any.whl
Size 42.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93b8009548a2e69d51cb1249b0628c4c2c86daf6a6562c7ed99646e90d33692e
BLAKE2b-256 checksum
How to use checksums
3da3692500e659ce9f0f64162b0b15e002088eb067339d2d702068cf04cdc9fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for mobiusguard-redact 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page