Skip to content

Suggestion: Integrate example defaults directly into package/application #11

Description

@aidankhogg

Problem to solve

Type: Enhancement / Feature Request

Description:
Currently, the example defaults (e.g. YAML policies, detectors, transforms) exist as external examples. These should be more tightly integrated into the package/application itself.

Motivation:

  • New users can run the package out-of-the-box without needing to fetch example files.
  • Provides a clear, supported default baseline configuration.
  • Reduces the gap between “hello world” usage and production deployment.

Proposal

  • Ship a set of example defaults (policies, detectors, transforms) directly within the package.
  • Make them accessible via redactable.get_default_policy() or similar helper.
  • Ensure consistency between example docs and packaged defaults.
  • Add tests to guarantee defaults always load and run correctly.

Alternatives considered

No response

Additional context

Example usage:

from redactable import apply, get_default_policy

text = "card 4242 4242 4242 4242"
policy = get_default_policy()
print(apply(text, policy=policy))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions