keyhole-sdk
Python SDK for interacting with Keyhole-compatible runtimes.
Install
pip install keyhole-sdk
Quickstart
from keyhole_sdk import KeyholeClient
client = KeyholeClient(base_url="http://localhost:8080")
# Health check
print(client.health())
# Runtime identity and capabilities
identity = client.identity()
print(identity)
# Current runtime state
print(client.state())
# Submit a realization request
receipt = client.realize(
candidate_digest="sha256:abc123",
payload={},
)
print(receipt)
# Replay the same digest safely
replay = client.realize(
candidate_digest="sha256:abc123",
payload={},
)
print(replay)
client.close()
Note: By default the test runtime runs in local-only mode — realization is not gated through MCP governance. Set
KEYHOLE_MCP_URLandKEYHOLE_MCP_TOKENon the runtime to enable governed mode.
API
| Method | Description |
|---|---|
health() |
GET /healthz — runtime liveness |
identity() |
GET /identity — runtime identity and capabilities |
state() |
GET /state — current runtime-local state |
realize(candidate_digest, payload) |
POST /realize — bounded realization request |
close() |
Close the underlying HTTP session |
Models
Pydantic models are available in keyhole_sdk.models:
RuntimeIdentityRuntimeStateRealizationRequestRealizationReceipt
Configuration
client = KeyholeClient(
base_url="http://localhost:8080",
timeout=10.0, # default
)
You can also pass a custom requests.Session for advanced use cases.
Compatibility
RuntimeBridgeClient is available as a backward-compatible alias for KeyholeClient.
License
Apache 2.0 — see LICENSE.
Metadata
Release files for keyhole-sdk 0.4.1
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 | |
|---|---|---|---|---|
| keyhole_sdk-0.4.1.tar.gz | 209.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| keyhole_sdk-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 500.3 kB
Release files / keyhole_sdk-0.4.1.tar.gz
| Download URL | keyhole_sdk-0.4.1.tar.gz |
|---|---|
| Size | 209.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c23c280ffe8cbd94bf1db25a4a3e9e5f3ac65b4a931e5787556d0e5c892d2ecb
|
|
BLAKE2b-256 checksum How to use checksums |
5b772c17b16a5ef51feb2e272f156dbec20d80e2400a5d51cc2fb3a43608612e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / keyhole_sdk-0.4.1-py3-none-any.whl
| Download URL | keyhole_sdk-0.4.1-py3-none-any.whl |
|---|---|
| Size | 290.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e06bbb305057dfc3797960923ef39217ce9bb337433076c897f29138c4c0de0f
|
|
BLAKE2b-256 checksum How to use checksums |
b51d50b0a94399f33f90225d3b5ae0e0e47e96a7e1845ce03ae86eb35232f3b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for keyhole-sdk 0.4.1
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.