Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Holon Python SDK

CI PyPI Python Apache 2.0 License

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, validated before sending; 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.

Serve an MCP App view

holon.view.app_view registers a built HTML file as an MCP App resource:

from holon.view import app_view

server.add_resource(app_view(
    "ui://foo/index.html", "Foo", "dist/index.html",
    connect_domains=["https://bar.example.com"],
))

The page itself uses holon-ui.

Metadata

Release files for holon-sh 0.0.1.dev5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for holon-sh 0.0.1.dev5
File Size Uploaded Provenance Actions
holon_sh-0.0.1.dev5.tar.gz 17.2 kB Without provenance Details for holon_sh-0.0.1.dev5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for holon-sh 0.0.1.dev5
File Interpreter ABI Platform Actions
holon_sh-0.0.1.dev5-py3-none-any.whl Python 3 none any Details for holon_sh-0.0.1.dev5-py3-none-any.whl

Total release size: 29.4 kB

Release files / holon_sh-0.0.1.dev5.tar.gz

Download URL holon_sh-0.0.1.dev5.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3e30b68f0af7ad43bd9ebe130aa8827782b38a071c672c5058e7b50f8fb9be98
BLAKE2b-256 checksum
How to use checksums
11009a8d0353b6a14bcd8134cc685fd7edfa542aceadbc28c9b355895eb72eb3
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.dev5-py3-none-any.whl

Download URL holon_sh-0.0.1.dev5-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9feb23f023785b3e9e83cda93996999cfa09fb04ca3351663179fe3d03952fd
BLAKE2b-256 checksum
How to use checksums
e2c4ab142e2fcaf767ec4b7a88379d4b83bb0a2091484b305d3b49757026d6aa
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.dev5

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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page