Exogram Python Client SDK
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.1.tar.gz
(6.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file exogram-0.1.1.tar.gz.
File metadata
- Download URL: exogram-0.1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74dc6b4ea478aa30056e396a3e1e03ee76446fd452db75152a835893e8695587
|
|
| MD5 |
b9f87bed17bb03c6e45054d25741e952
|
|
| BLAKE2b-256 |
caf2e0ec84f44d127b10e82e6762e05374bb19995b3c9ce708c28d37e9b4cdd9
|
File details
Details for the file exogram-0.1.1-py3-none-any.whl.
File metadata
- Download URL: exogram-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f512e3716c1406ed7ad5d8b6acff9ddc3af3ae186d54fac0ced5de24db3043c
|
|
| MD5 |
711de3da659c958e31c1857a1ef80b6f
|
|
| BLAKE2b-256 |
e3c27f4cc587e4247d2310a1e18de50e69024500cd3feef3dc31f713f8155eac
|