Homer SDK is a thin client. All governance, policy checks, and intelligence run on Homer Server.
Project description
Homer SDK (Thin Client)
Python SDK for Homer Server. Homer Server is the semantic control and governance runtime for AI.
The SDK is intentionally thin. It forwards requests to Homer Server, where policy enforcement, semantic intelligence, runtime controls, and decision lineage are executed.
Note: CLI entrypoint issues were fixed in v1.3.4. If you tried earlier and saw errors, please upgrade and try again.
python3 -m pip install -U homer-sdk
homer-sdk --version
Public Demo
- Demo server:
https://demo.homersemantics.com - Bootstrap key:
demo_public_v1
from homer_sdk import Homer
homer = Homer(
server_url="https://demo.homersemantics.com",
api_key="demo_public_v1",
)
# SDK auto-exchanges bootstrap key for a short-lived session key.
resp = homer.invoke(
provider="openai",
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Hello from demo"}],
)
print(resp.raw_response["content"])
Install
pip install homer-sdk
Verify CLI install:
homer-sdk --version
Optional provider extras:
pip install "homer-sdk[openai]"
pip install "homer-sdk[anthropic]"
pip install "homer-sdk[all]"
Quick Start (Your Server)
from homer_sdk import Homer
homer = Homer(
server_url="https://your-homer-server",
api_key="hk-...",
)
health = homer.health()
print(health["status"])
Chat Invocation
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 text."}],
)
print(resp.raw_response.choices[0].message.content)
print(resp.homer.classification)
print(resp.homer.policy)
print(resp.homer.audit)
Runtime Execution (Server Connector Path)
Use execute() to run policy-gated actions through server connectors.
resp = homer.execute(
action="send_webhook",
payload={
"url": "https://hooks.example.com/ingest",
"body": {"event": "policy_approved"},
},
)
print(resp.raw_response["execution"])
Core Methods
Homer.health()->GET /v1/healthHomer.invoke(...)->POST /v1/invokeHomer.execute(...)->POST /v1/invokewithexecutionpayloadHomer.analyze(text)->POST /v1/analyzeHomer.context.*->/v1/context/...- Semantic/graph helpers ->
/v1/semantic/...
Support and Feedback
If you hit any issues, please share feedback or error details:
- Support: info@homersemantics.com
- Founder: anantdhavale@gmail.com
- GitHub Issues: https://github.com/AnantDhavale/homer_core_sdk/issues
Helpful details for issue reports:
- SDK version
- Python version
- Full traceback
- Request snippet (without secrets)
- Timestamp and timezone
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
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 homer_sdk-1.3.4.tar.gz.
File metadata
- Download URL: homer_sdk-1.3.4.tar.gz
- Upload date:
- Size: 60.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a6972c710b93a20c1ac7594c9ea84cafa841d28894310e236e9a41c8613df56
|
|
| MD5 |
ee6ab696dd3f591bc34fe49282e2b77e
|
|
| BLAKE2b-256 |
43ff3f2ecfda728966d31875cb2a6bb7037388e896d92fe5cbcbd7f07d3ccba2
|
File details
Details for the file homer_sdk-1.3.4-py3-none-any.whl.
File metadata
- Download URL: homer_sdk-1.3.4-py3-none-any.whl
- Upload date:
- Size: 77.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a54eb15d0f4b2faaee8d273e5d5594b285f8992093d0094b8d88af94177b7ddf
|
|
| MD5 |
b22f2c0bc2c46fce0f742c6e426e5e01
|
|
| BLAKE2b-256 |
68ef24644d871c7eb76051373082048288ba5549e198ea6aec10a86219d8b249
|