Releases: CoreNovus/redactkit
Releases · CoreNovus/redactkit
v0.1.0 — initial public release
redactkit is now on PyPI: pip install redactkit
Production-hardened Python redaction for structured logs, LLM agent payloads, and AWS-signed URLs. Zero runtime dependencies, Python 3.10+. Extracted from the Convilyn agent platform.
What's in v0.1.0
Core API
redact_args(payload, *, key_pattern=SENSITIVE_KEY_RE)— deep-redact dicts / lists / tuples / strings. Keys matching the denylist regex have values replaced with"***"; string leaves get AWS Signature V4 presigned-URL signatures scrubbed.redact_text(value, *, key_pattern=SENSITIVE_KEY_RE)— scrubkey=valueandkey:valuepatterns plus presigned-URL signatures from free-form text.redact_url_query(url)— redact sensitive query-parameter values while preserving keys, path, and scheme.summarize_payload(payload, *, max_bytes=2048, already_redacted=False)— wire-safe truncation with UTF-8 boundary safety; returns(summary, overflow_body).output_digest(body)— deterministic 16-hex SHA-256 prefix for content-addressing overflow bodies.
Extension hooks (SOLID-friendly)
extend_key_pattern(extra_terms)— return a new compiled pattern unioningDEFAULT_KEY_TERMSwith caller-supplied extras. Open/Closed: no module-state mutation.OutboundErrorRedactor(pattern)/OutboundErrorRedactor.from_terms(terms)— mask caller-supplied internal terms. No implicit defaults — Dependency Inversion at the constructor.
Public regex constants
SENSITIVE_KEY_RE, SENSITIVE_KV_TEXT_RE, PRESIGNED_QUERY_RE, DEFAULT_KEY_TERMS, MASK, MAX_SUMMARY_BYTES.
Type info
Ships with a PEP 561 py.typed marker — strict-pyright-clean on src/.
Install
pip install redactkitTry it
from redactkit import redact_args
redact_args({"password": "hunter2", "user": "alice"})
# → {'password': '***', 'user': 'alice'}See the README for the full guide, comparison table vs Presidio / scrubadub, and three killer examples.
Notes
- Pre-1.0: public API may evolve based on early-user feedback before v1.0.
- Bugs, feature requests, security issues — see CONTRIBUTING.md and SECURITY.md.
- Good-first-issues seeded — check the issue tracker.