Skip to main content

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


Download files

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

Source Distribution

atheon_codex-0.3.0.tar.gz (45.3 kB view details)

Uploaded Source

Built Distribution

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

atheon_codex-0.3.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file atheon_codex-0.3.0.tar.gz.

File metadata

  • Download URL: atheon_codex-0.3.0.tar.gz
  • Upload date:
  • Size: 45.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.15

File hashes

Hashes for atheon_codex-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b067c8b50a62ae52599ff513cc05c51b274a0703118798025ac1cb8f7aace76a
MD5 9d1a1b41cefcc9b584c93b99d6f7f5d5
BLAKE2b-256 491b96e2f51fbb2e1ef3587c06865a6f2507493b7cf9af1c3e5c9894f7c32009

See more details on using hashes here.

File details

Details for the file atheon_codex-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for atheon_codex-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 382631e5fcf3736705f08bd6532c15ed872b91c616aa3ffab7f6a896ad944460
MD5 b265963e83ab0418c21929f90799d571
BLAKE2b-256 8bdd99be42d9e2e16c4676d2c6beb9c1402325e2b920468fe2c554e36d670283

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