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. Bind elicit to answer in place, and the call returns its usual typed output:

from holon.apps import create_apps
from mcp.types import ElicitResult

async def elicit(context, params):
    return ElicitResult(action="accept", content=await ask(params.message))

apps = create_apps({"bar": {"endpoint": "https://bar.example.com/mcp", "elicit": elicit}})
greeting = await apps.bar.tools.greet(name="world")

Without elicit, a client declares no capability, so a server that needs it rejects the call.

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.dev4

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.dev4
File Size Uploaded Provenance Actions
holon_sh-0.0.1.dev4.tar.gz 16.7 kB Without provenance Details for holon_sh-0.0.1.dev4.tar.gz

Built distribution (wheel)

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

Total release size: 28.9 kB

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

Download URL holon_sh-0.0.1.dev4.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a1493b23edcf70222c7a4b6bcc21e4b5f37af091601a60359d300d35dd2b36db
BLAKE2b-256 checksum
How to use checksums
a24463b1c7ae4dee09706aabb79aeffdf5df9c33e1a4196ae0d20fc6e047a8e7
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.dev4-py3-none-any.whl

Download URL holon_sh-0.0.1.dev4-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07fa3480c324008396567e78f14728ac5c2c56ae5eb95ba9d13df2845df29c2e
BLAKE2b-256 checksum
How to use checksums
179aaf95d3ceafb6366d18f7e0274e29ad1ebe7dae9ccf4a8f86f4c795ab76a0
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.dev4

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