Skip to main content

Python SDK for Chox — AI governance proxy

Project description

chox-sdk

Python SDK for Chox — AI governance proxy.

Install

pip install chox-sdk

Quickstart

from chox import ChoxClient

chox = ChoxClient(base_url="https://chox.example.com", token="chox_token_...")

verdict = chox.evaluate(tool="stripe.create_charge", arguments={"amount": 5000})
if verdict.verdict == "allow":
    pass  # proceed

Config

Parameter Type Default Description
base_url str required Chox gateway base URL
token str required Admin key (chox_admin_...) or caller token (chox_token_...)
fail_open bool True Return allow verdict on network errors instead of raising
timeout float 5.0 Request timeout in seconds

Resources

# Evaluate a tool call
chox.evaluate(tool, arguments=None, caller_token=None, context=None)

# Projects
chox.projects.create(name=..., slug=...)
chox.projects.get()

# Callers (AI systems)
chox.callers.create(name=..., description=...)
chox.callers.list()
chox.callers.delete(id)

# Integrations
chox.integrations.create(name=..., integration_type=..., destination_url=...)
chox.integrations.list()
chox.integrations.delete(id)

# Logs
chox.logs.list(caller_id=None, integration=None, action_type=None, start=None, end=None, limit=None, offset=None)
chox.logs.get(id)

# Stats
chox.stats.actions(start=None, end=None)
chox.stats.hourly(start=None, end=None)
chox.stats.integrations(start=None, end=None)
chox.stats.total()

License

MIT

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

chox_sdk-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

chox_sdk-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for chox_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cf139ffb82edacac805662abed14753e2b516a875fbfc2eef632a9cb87407660
MD5 2b4e942c7ca6332b51e0705e459df67e
BLAKE2b-256 d86b206cccca15ea569c9dedf0601d109f056c1687ae9c8f77e3958e6874dae5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chox_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for chox_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09245438aa0e67b212306702e214aa6cd3a2fbe479dd19005b95fbbc52341203
MD5 7c04a96dc157863f510d1e5f44a14d1d
BLAKE2b-256 203c1fbc091efb811c275a33bf0e7ed3d4e1b6dfa35bedaa41bf4423d185914a

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