Skip to main content

Homer SDK (Beta): Semantic control plane SDK for governed AI interactions

Project description

Homer SDK (Beta) (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.

Access

Homer SDK requires a Homer Server instance. Contact ifo@homersemantics.com / anantdhavale@gmail.com to get access.

Usage Terms

Usage limits and commercial terms are defined in TERMS_OF_SERVICE.md.

License

Proprietary commercial license. See LICENSE. Copyright © Anant Dhavale

Contact

anantdhavale@gmail.com info@homersemantics.com

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

homer_sdk-1.2.2-py3-none-any.whl (60.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: homer_sdk-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 60.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a6999b1063f292e10fb3cb3bc6a2b4bdc54b3cda9933cf7a41ced260b6b4046e
MD5 fce59d70123770bd19f737bc5effd965
BLAKE2b-256 d63b41fce7b201b59d32704b64d2d67a0ae5b79f804cc3375f1c632d52e79d6e

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