This release is a pre-release and may not be stable for production use.
Holon Python SDK
This repository contains the Python runtime for holon.
Install
uv add --prerelease allow holon-sh
uv add --dev holon-types
holon-types is the holon CLI; it brings mypy, which holon types check runs from the project's environment.
Invoking MCP Servers
The Holon Python SDK allows generation of type-safe MCP clients. See Example for an explanation, or Dependencies to understand dependency resolution.
Type-checking MCP invocations
uv run holon types check
Call a tool
from holon.apps import apps
async def greet(name: str) -> str:
greeting = await apps.bar.tools.greet({"timeout": 5.0}, name=name)
return greeting["result"]
Arguments are keywords; the result is validated against the output schema and returned.
Handle errors
from holon.client import ToolCallError
try:
await apps.bar.tools.greet(name="world")
except ToolCallError as error:
error.result # the original MCP result
Read the whole result
call_tool returns the full MCP result instead of raising:
result = await apps.bar.call_tool("greet", name="world")
if result.result_type == "input_required":
... # call again with input_responses and request_state
elif result.is_error:
... # inspect result.content
else:
result.structured_content # typed as Outputs.bar.greet
The options dict also accepts input_responses, request_state and meta.
Answer a server's question
A tool can stop and ask for input through an MCP elicitation. Pass elicit to answer in place, and the call returns its usual typed output:
from mcp.types import ElicitResult
async def elicit(params):
return ElicitResult(action="accept", content=await ask(params.message))
greeting = await apps.bar.tools.greet({"elicit": elicit}, name="world")
Without elicit, the question arrives on ToolCallError.result, or as an input_required result from call_tool. To answer later, for example in another request, call again with input_responses and request_state.
Identify the caller
Inside a tool handler, get_context().principal is the user Holon admitted for the request, or None for anonymous requests:
from holon.context import get_context
principal = get_context().principal
if principal is not None:
principal.issuer, principal.subject, principal.scopes
principal.claims.get("email") # standard OpenID claims are typed: str | None
Metadata
Release files for holon-sh 0.0.1.dev6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| holon_sh-0.0.1.dev6.tar.gz | 16.5 kB | Without provenance | Details for holon_sh-0.0.1.dev6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| holon_sh-0.0.1.dev6-py3-none-any.whl | Python 3 | none | any | Details for holon_sh-0.0.1.dev6-py3-none-any.whl |
Total release size: 28.9 kB
Release files / holon_sh-0.0.1.dev6.tar.gz
| Download URL | holon_sh-0.0.1.dev6.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
112dc256dead17205e2bca0561768e4399277323b88dee9d9e5ff095e4b10648
|
|
BLAKE2b-256 checksum How to use checksums |
6aa763a37c310ece05b17b7ba38ca21e5f72db066bbf0b6563c422b4f15e99af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / holon_sh-0.0.1.dev6-py3-none-any.whl
| Download URL | holon_sh-0.0.1.dev6-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e953e731c320c60f0e007c623ef0968861043a1ba8e56fcdd17385971dd09182
|
|
BLAKE2b-256 checksum How to use checksums |
387f66526590f2dc279f7e4284e99a90b37736db847730a14d832a1b651b3045
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for holon-sh 0.0.1.dev6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.