Skip to main content

Exogram Python Client SDK

PyPI License: MIT Python 3.10+

Official Python Client SDK for the Exogram Authority Runtime.

Evaluate action authorization before state changes, commit cryptographic execution tokens to the immutable audit ledger, and store/search records in the Exogram Encrypted Trust Vault.

Installation

pip install exogram

or using uv:

uv add exogram

Quickstart

Synchronous Usage

from exogram import Exogram

client = Exogram(token="exo_prod_your_api_key")

# 1. Evaluate authorization before state-changing operation
eval_res = client.evaluate(
    action_type="database_write",
    namespace="production",
    payload={"table": "users", "action": "update"}
)

if eval_res.allowed:
    print(f"Action Allowed! Execution Token: {eval_res.token}")
    
    # Perform database operation...
    
    # 2. Commit execution to audit trail
    client.commit(token=eval_res.token, status="success")
else:
    print(f"Action Blocked by Policy: {eval_res.policy_violation}")

Function Decorator (@client.governed)

from exogram import Exogram

client = Exogram(token="exo_prod_your_api_key")

@client.governed(action_type="user_deletion")
def delete_user(user_id: str):
    # This function automatically requests authorization from Exogram
    # before executing, and commits the execution token on completion!
    print(f"Deleting user {user_id}...")

delete_user("usr_123")

Asynchronous Usage (AsyncExogram)

import asyncio
from exogram import AsyncExogram

async def main():
    client = AsyncExogram(token="exo_prod_your_api_key")
    
    # Search encrypted trust vault
    results = await client.evaluate(action_type="api_call")
    print(results)

asyncio.run(main())

Environment Variables

Variable Required Default Description
EXOGRAM_BEARER_TOKEN Yes Your Exogram API key or bearer token
EXOGRAM_API_URL No https://api.exogram.ai Exogram API base URL

License

MIT — see LICENSE for details.

Download files

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

Source Distribution

exogram-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: exogram-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for exogram-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5d783e8e2920395b11ba583c6b43fc969c94ce8db7ec4578c02a7bf0cc12a1c5
MD5 5edccee1f01f60a6a9bb0abd32867371
BLAKE2b-256 bdd32d395ebe9b58c7769c34b283193cf7199f11fc0ff088ba4d0178e09a25fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: exogram-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for exogram-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31848d9bc5a76b16b745486cf0eb4c89c9bb0115e4ae1294909b75ba9bee78bc
MD5 bd1360fb8f715551d0e441ab4e51f60c
BLAKE2b-256 011fb04c37b09a13dd6241019a2f35753d2618592bce5ed0d692cf52201526ae

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