Skip to main content

Official Python client for Open AI Guardrails policy distribution, audit evidence, and OPA control-plane APIs.

Project description

openaiguardrails-sdk

Official Python client for the Open AI Guardrails runtime governance API.

The PyPI distribution is currently published as openaiguardrails-sdk while PyPI reviews the canonical openaiguardrails project name. The Python import remains openaiguardrails.

Install

pip install openaiguardrails-sdk

Usage

from openaiguardrails import OpenAIGuardrailsClient

client = OpenAIGuardrailsClient(
    base_url="https://openaiguardrails.org",
    token="YOUR_OPENAIGUARDRAILS_API_TOKEN",
)

policy = client.get_policy("prod-safety-alpha")
audit = client.export_audit("prod-safety-alpha")

For compatibility with the original client class name, NoirGuardrailsClient remains available as an alias.

API surface

  • health()
  • list_policies()
  • get_policy(policy_id="prod-safety-alpha")
  • toggle_policy_control(policy_id, key, value)
  • run_policy_action(policy_id, action, **payload)
  • export_audit(policy_id="prod-safety-alpha")
  • list_opa_imports()
  • import_opa_policy(payload)
  • simulate_opa_import(import_id, input=None)
  • export_opa_import(import_id, target)
  • publish_opa_import(import_id, payload=None)

The client is dependency-free and uses Python's standard library HTTP stack.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openaiguardrails_sdk-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openaiguardrails_sdk-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file openaiguardrails_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: openaiguardrails_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for openaiguardrails_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a7f8b4a775e079fbc9c4f0e5a65acb929b5e9a4040d9cc88757455d2b0d4abc6
MD5 a1175619a1a1ee136e94c68f43458efc
BLAKE2b-256 115976023c5f6ca352ac776266fd8b9034208351c057db5e700a20184d888ed2

See more details on using hashes here.

File details

Details for the file openaiguardrails_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openaiguardrails_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68b4608a2ba64ebadc91aea4c070397df307546a1f803f23b9ef66e1c9c4830d
MD5 6f60f6ee60bc00c82f33c79678473525
BLAKE2b-256 5835b9099acf1b44711208c08452b9f2260e9632a22678dbcaf2d9c2931f5ae4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page