Skip to main content

Semantic control plane SDK for governed AI interactions

Project description

Homer SDK (Thin Client)

Homer SDK is a thin client. All governance, policy checks, and intelligence run on Homer Server.

Highlights

  • Multi-provider wrappers (openai, anthropic, azure_openai, generic broker)
  • Policy enforcement for input/output checks
  • Content enrichment (classification, norm extraction, confidence, modality)
  • Immutable-style decision ledger and telemetry helpers
  • Context store utilities

Quick Start

from homer_sdk import Homer

homer = Homer(server_url="https://your-homer-server", api_key="hk-...")
client = homer.openai()

resp = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Summarize this policy."}],
)

print(resp.raw_response.choices[0].message.content)
print(resp.homer.classification)

Install

pip install homer-sdk

Provider SDK extras:

pip install "homer-sdk[all]"
pip install "homer-sdk[postgres]"         # source build of psycopg2
pip install "homer-sdk[postgres-binary]"  # convenience binary wheel

Security Note (Broker/Gateway Mode)

If you pass api_key in homer.broker(...), that key is sent to Homer Server in the /v1/invoke payload.

  • SDK now refuses to send broker_api_key unless HOMER_SERVER_URL is HTTPS.
  • Exception: local development on http://localhost or http://127.0.0.1.
  • Recommended production pattern: keep downstream provider keys server-side and do not send them from clients.

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

homer_sdk-1.2.0.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

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

homer_sdk-1.2.0-py3-none-any.whl (58.3 kB view details)

Uploaded Python 3

File details

Details for the file homer_sdk-1.2.0.tar.gz.

File metadata

  • Download URL: homer_sdk-1.2.0.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for homer_sdk-1.2.0.tar.gz
Algorithm Hash digest
SHA256 2a5c506302a86b66b275ea77e06401999ce909160852b8f031f83b04093cbafa
MD5 ccb77c860ce6f6d1e0ab92377b8a0407
BLAKE2b-256 52df4a268ebfbfb0794b66583bac92f70d0860adc23107b9c7fc9664d1c1b78f

See more details on using hashes here.

File details

Details for the file homer_sdk-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: homer_sdk-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 58.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for homer_sdk-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6946ddc5885cb4fbc32d636777ffa452298891657e78f434c99917cc61627763
MD5 548ed5606a88e334090da087780b40f8
BLAKE2b-256 5128b503c203e7afd0edf37f3afe38f8cf8c237074d3b4bd0ea8e181037f998a

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