Exempt your own data /
Your own company name is not personal data to you. Tell the engine, and keep a record of what it let through.
The problem
You run redaction over your support inbox. Every ticket comes back with your own support address masked as [EMAIL], your company name gone, and your own IBAN on invoices replaced by [BANK_ACCOUNT]. None of that is personal data you need to protect from yourself, and its absence makes the output harder to read and harder to route.
The allowlist is the switch for this, and it is the only option in the SDK that turns redaction off. That is worth keeping in mind while you configure it: every other option fails toward masking more, this one fails toward masking less.
Values you own
Set it on the instance for things that never change, per call for anything situational. The two merge rather than replacing each other.
import euredact
sdk = euredact.EuRedact(allowlist=["ACME NV", "info@acme.be"])
text = "ACME NV: mail info@acme.be or jan@acme.be about IBAN NL91 ABNA 0417 1643 00."
sdk.redact(text, countries=["NL"]).redacted_text
# "ACME NV: mail info@acme.be or [EMAIL] about IBAN [BANK_ACCOUNT]."
sdk.redact(text, countries=["NL"], allowlist=["jan@acme.be"]).redacted_text
# "ACME NV: mail info@acme.be or jan@acme.be about IBAN [BANK_ACCOUNT]."Matching is whole-span and case-insensitive, so acme nv in the middle of a sentence is exempt and ACME NV Holdings is not.
Identifiers you own, however they are typed
An IBAN is almost never written the way it is stored. Allowlist it once, in any form, and the spaced and hyphenated spellings are exempt too:
sdk = euredact.EuRedact(allowlist=["NL91ABNA0417164300"])
# all three are exempt
"NL91ABNA0417164300"
"NL91 ABNA 0417 1643 00"
"NL91-ABNA-0417-1643-00"This covers the structured types — IBAN, BIC, card, phone, VAT, national and tax IDs, passport, licence, permit, health, chamber-of-commerce, IMEI and VIN. Free-text types stay literal on purpose: jan.devries@acme.be and jandevries@acme.be are different mailboxes at most providers, so folding them would exempt an address you never listed. The rule widens the spelling, never the scope — a different account is still redacted.
A whole domain, without listing every mailbox
Enumerating staff addresses is a list that drifts the moment someone joins or leaves. Allowlist the domain instead:
sdk = euredact.EuRedact(allowlist_domains=["acme.be"])
sdk.redact("Mail jan@acme.be or piet@acme.be", countries=["NL"]).redacted_text
# "Mail jan@acme.be or piet@acme.be"Domain rules apply to EMAIL and URL only and cover subdomains, so mail.acme.be is included. The match is on a label boundary, which is the part worth checking yourself: acme.be does not exempt evilacme.be. A look-alike domain registered by someone else does not inherit your exemption.
Prove what you kept
An exemption is a deliberate decision to leave a direct identifier in a document that otherwise claims to be redacted. Before 0.5.0 that decision was invisible in the output — indistinguishable from never having detected the value at all. result.exempted is the record:
result = sdk.redact(text, countries=["NL"])
for e in result.exempted:
print(e.entity_type, e.text, e.rule, e.rule_kind)
# EntityType.EMAIL jan@acme.be acme.be domain
# EntityType.ORGANISATION_NAME ACME NV ACME NV valueEach entry names the span, the rule that matched it and whether that rule was a value or a domain. If you have to show an auditor why a live address survived a redaction pipeline, this is the answer, and it comes from the same run rather than from your configuration file.
Why there are no wildcards
You cannot write *@acme.be or * Maes, and that is deliberate rather than unfinished.
Because the allowlist is the one option that disables redaction, an over-broad entry fails silently toward under-redaction: *@* would switch off email redaction across every document, and * Maeswould exempt a whole family’s names once the cloud tier is on — with no error, and output that still looks redacted. A domain rule cannot be widened that way: it structurally cannot match a person’s name or an IBAN, only an address at a domain you named.
It covers the cloud tier too
The allowlist applies to the model-only types as well, including ORGANISATION_NAME and PERSON_NAME. Allowlisting your company name exempts it whether it was matched by a rule or returned by the model, so you do not need a second mechanism when you turn the cloud tier on.