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
Metadata
Release files for homer-sdk 1.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| homer_sdk-1.3.4.tar.gz | 60.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| homer_sdk-1.3.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 138.0 kB
Release files / homer_sdk-1.3.4.tar.gz
| Download URL | homer_sdk-1.3.4.tar.gz |
|---|---|
| Size | 60.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a6972c710b93a20c1ac7594c9ea84cafa841d28894310e236e9a41c8613df56
|
|
BLAKE2b-256 checksum How to use checksums |
43ff3f2ecfda728966d31875cb2a6bb7037388e896d92fe5cbcbd7f07d3ccba2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / homer_sdk-1.3.4-py3-none-any.whl
| Download URL | homer_sdk-1.3.4-py3-none-any.whl |
|---|---|
| Size | 77.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a54eb15d0f4b2faaee8d273e5d5594b285f8992093d0094b8d88af94177b7ddf
|
|
BLAKE2b-256 checksum How to use checksums |
68ef24644d871c7eb76051373082048288ba5549e198ea6aec10a86219d8b249
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|