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.

Metadata

Release files for exogram 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for exogram 0.1.1
File Size Uploaded
exogram-0.1.1.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for exogram 0.1.1
File Interpreter ABI Platform
exogram-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / exogram-0.1.1.tar.gz

Download URL exogram-0.1.1.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
74dc6b4ea478aa30056e396a3e1e03ee76446fd452db75152a835893e8695587
BLAKE2b-256 checksum
How to use checksums
caf2e0ec84f44d127b10e82e6762e05374bb19995b3c9ce708c28d37e9b4cdd9
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / exogram-0.1.1-py3-none-any.whl

Download URL exogram-0.1.1-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f512e3716c1406ed7ad5d8b6acff9ddc3af3ae186d54fac0ced5de24db3043c
BLAKE2b-256 checksum
How to use checksums
e3c27f4cc587e4247d2310a1e18de50e69024500cd3feef3dc31f713f8155eac
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page