Python SDK for Atheon
Project description
Codex: Python SDK for Atheon
The Atheon Codex Python library provides convenient access to the Atheon Gateway Ad Service from any Python 3.10+ applications. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by httpx.
Installation
# install from PyPI
pip install atheon-codex
Usage
import os
from atheon_codex import AtheonCodexClient, AdUnitsFetchModel, AdUnitsIntegrateModel
client = AtheonCodexClient(
api_key=os.environ.get("ATHEON_CODEX_API_KEY"),
)
fetch_payload = AdUnitsFetchModel(query="How can I write blogs for my website?")
fetch_result = client.fetch_ad_units(fetch_payload)
ad_unit_ids = [ad_unit["id"] for ad_unit in fetch_result["response_data"]]
integrate_payload = AdUnitsIntegrateModel(
ad_unit_ids=ad_unit_ids, base_content="insert the llm response generated from your application as the base content"
)
integration_result = client.fetch_ad_units(integrate_payload)
print(integration_result)
While you can provide an api_key keyword argument, we recommend using python-dotenv (or something similar) to add ATHEON_CODEX_API_KEY="My Eon API Key" to your .env file so that your API Key is not stored in source control.
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 atheon_codex-0.3.2.tar.gz.
File metadata
- Download URL: atheon_codex-0.3.2.tar.gz
- Upload date:
- Size: 55.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6c7457fbde24c281def1e99cc84c88c1e29290bc21b6c1ec78d54fd4606dfdc
|
|
| MD5 |
8950ea4654001505d4209f17ef9512e1
|
|
| BLAKE2b-256 |
266707aa6e69fe781cc77f0d99b198dbb547ea09dde6d0a96917b651c6cdae09
|
File details
Details for the file atheon_codex-0.3.2-py3-none-any.whl.
File metadata
- Download URL: atheon_codex-0.3.2-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c0de4f3c048793f398fe73214ebfa2b64f273bb6c7801dab1086db6d6e32fe1
|
|
| MD5 |
ef30967da6f1ab57a9c61a07624abf3e
|
|
| BLAKE2b-256 |
4d5d2c83cc8b3979bb6394889f7ca2850486b524669ddaaffe0429e374ad3c6f
|