Official Python SDK for the Aethis developer API — eligibility decisions and bundle schemas
Project description
Aethis SDK for Python
Official Python SDK for the Aethis developer API — eligibility decisions, ruleset schemas, and stateful decision sessions.
Documentation: docs.aethis.ai · OpenAPI spec · agents via MCP: claude mcp add aethis -- npx -y aethis-mcp
Install
pip install aethis-sdk
Python 3.11+. Requires httpx and pydantic.
Quickstart
One-shot decision (sync)
from aethis_sdk import Aethis
with Aethis(api_key="YOUR_KEY") as client:
response = client.decide(
ruleset_id="eng_lang:20250912-ec5d7c23",
field_values={
"nationality": "French",
"degree_awarded_in_uk": True,
},
)
print(response.decision) # "eligible" | "not_eligible" | "undetermined"
One-shot decision (async)
import asyncio
from aethis_sdk import AsyncAethis
async def main():
async with AsyncAethis(api_key="YOUR_KEY") as client:
response = await client.decide(
ruleset_id="eng_lang:20250912-ec5d7c23",
field_values={"nationality": "French"},
)
print(response.decision)
asyncio.run(main())
Stateful decision session
Accumulate answers locally and query the API only when needed. Cached until an answer changes. The session does not manage the client — the caller keeps the Aethis context open for the session's lifetime.
from aethis_sdk import Aethis, SyncDecisionSession
with Aethis(api_key="YOUR_KEY") as client:
schema = client.get_schema("eng_lang:20250912-ec5d7c23")
session = SyncDecisionSession("eng_lang:20250912-ec5d7c23", client, schema)
session.answer("nationality", "French")
while (nq := session.next_question()) is not None:
answer = input(f"{nq.question} ")
session.answer(nq.field_id, answer)
print("Eligible:", session.is_eligible())
The async equivalent is DecisionSession — same surface, await on the HTTP methods (decide, is_eligible, next_question, status).
What's included
| Import | Purpose |
|---|---|
Aethis, AsyncAethis |
HTTP clients for /decide, /rulesets/{id}/schema, /me, /rulesets/{id}/explain, /rulesets/{id}/source |
SyncDecisionSession, DecisionSession |
Stateful adapters over the stateless /decide endpoint |
DecideResponse, SchemaResponse, SchemaField, NextQuestion, SectionResult |
Pydantic response models |
AethisError, AethisAPIError, AethisUnavailable, AethisTimeout |
Exception hierarchy |
Configuration
api_key— required. Provisioned via aethis.ai.base_url— defaults tohttps://api.aethis.ai. HTTP is only permitted forlocalhost/127.0.0.1or when passing a testtransport.timeout— per-request, seconds. Defaults to 5.iam_token— optional bearer token for Cloud Run service-to-service auth.
Status
Pre-1.0. The decision surface (/decide, /schema) is stable; authoring endpoints (projects, rulesets, publishing) are not yet exposed here — use the Aethis CLI for those.
Links
- Issue tracker: https://github.com/Aethis-ai/aethis-sdk-python/issues
- API docs: https://aethis.ai
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 aethis_sdk-0.3.0.tar.gz.
File metadata
- Download URL: aethis_sdk-0.3.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c48612268ee9aff14e258018c7b1cd1fe0560d08e9ae0bbfc6238e3c23251f79
|
|
| MD5 |
d16b2fedb74f8bfe4f087859c2419787
|
|
| BLAKE2b-256 |
c32e4fd8f9fa4de8c88983f942c07852536b54aa867a797252898343805967a2
|
Provenance
The following attestation bundles were made for aethis_sdk-0.3.0.tar.gz:
Publisher:
publish.yml on Aethis-ai/aethis-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aethis_sdk-0.3.0.tar.gz -
Subject digest:
c48612268ee9aff14e258018c7b1cd1fe0560d08e9ae0bbfc6238e3c23251f79 - Sigstore transparency entry: 1449564614
- Sigstore integration time:
-
Permalink:
Aethis-ai/aethis-sdk-python@6b1cc413fccf78996da0ae41eb38629f19e9a757 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/Aethis-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6b1cc413fccf78996da0ae41eb38629f19e9a757 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aethis_sdk-0.3.0-py3-none-any.whl.
File metadata
- Download URL: aethis_sdk-0.3.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc3732f6679e13edd5075629ac64a41aa4b86369a88ef8380cac065497804156
|
|
| MD5 |
44bd2581d9390489d0b750d3a70fb411
|
|
| BLAKE2b-256 |
72d3f063057aea3a558eacca18e04a5101adf4b2952b89c431b18cb08fdd5418
|
Provenance
The following attestation bundles were made for aethis_sdk-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on Aethis-ai/aethis-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aethis_sdk-0.3.0-py3-none-any.whl -
Subject digest:
cc3732f6679e13edd5075629ac64a41aa4b86369a88ef8380cac065497804156 - Sigstore transparency entry: 1449564652
- Sigstore integration time:
-
Permalink:
Aethis-ai/aethis-sdk-python@6b1cc413fccf78996da0ae41eb38629f19e9a757 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/Aethis-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6b1cc413fccf78996da0ae41eb38629f19e9a757 -
Trigger Event:
push
-
Statement type: