Python SDK

Use typed policy, scan and audit operations from Python

Example

Check a customer reply with an email-address rule set to Review

Python excerpt

content = "Please contact sam@example.test about order 2041."

# With the client configured and the exact quote approved
result = client.check(
    policy_id, content, **inputs,
    idempotency_key=event_id,
    return_redacted_content=True,
)

Result fields

{
  "status": "completed",
  "decision": "review",
  "safe_to_continue": false
}

Email address found

Hold the reply for human review

Forward only completed Allow results with safe_to_continue=true; Review, Block, incomplete results and errors stop the next action

Setup

  1. Install the supplied local SDK wheel in your Python environment
  2. Configure the service URL, scoped key and policy version
  3. Approve the exact quote and run the complete setup example
  4. Handle the result before forwarding text from your application
Read getting started