Redact | Python SDK
The Pangea Redact API helps developers limit the sprawl of sensitive information by performing redaction using defined rules.
Redact client
Redact(token, config, logger_name, config_id)Initializes a new Redact client.
config = PangeaConfig(domain="pangea_domain")
redact = Redact(token="pangea_token", config=config)
download-file
Redact.download_file()Poll result
Redact.poll_result(exception)Returns request's result that has been accepted by the server
response = service.poll_result(exception)
Redact
Redact.redact(text, debug, rules, rulesets, return_result, redaction_method_overrides)Redact sensitive information from provided text.
response = redact.redact(text="Jenny Jenny... 555-867-5309")
Redact structured
Redact.redact_structured(data, jsonp, format, debug, rules, rulesets, return_result, redaction_method_overrides)Redact sensitive information from structured data (e.g., JSON).
data = {
"number": "555-867-5309",
"ip": "1.1.1.1",
}
response = redact.redact_structured(data=data, redact_format="json")
Unredact
Redact.unredact(redacted_data, fpe_context)Decrypt or unredact fpe redactions