Skip to main content

Functions

create_redactor()

Builds a redactor function from a RedactorConfig. The returned callable recursively redacts strings in any value (strings, dicts, lists, tuples).

create_default_redactor()

Equivalent to create_redactor(RedactorConfig()) — returns a redactor with all default patterns enabled.

Parameters

RedactorConfig
required
Configuration specifying which patterns to apply.

Returns

A callable (value: Any) -> Any that recursively redacts PII. Safe to call on strings, dicts, lists, or nested structures.

Examples

Build and pass to init()

Standalone use

Default redactor

See Also