Skip to main content

KinopioHub.py

简体中文 · Wiki

An asyncio SDK for sharing current JSON values across languages and devices. Automatically selects and hosts a shared LAN node; no Node.js runtime is needed.

Python 3.10+. Use the matching source checkout.

Get started

Run from this repository:

uv sync --extra dev
uv run python examples/watch.py
# In another terminal:
uv run python examples/basic.py

Install this source checkout with python -m pip install -e /path/to/KinopioHub.py.

The namespace is read-only; omitting it generates a separate UUID for each instance. To share data, use the same explicit namespace, for example KinopioHub("demo"), then access hub.var("battery").

Variables live in SDK memory. A running instance retains state while offline; when the last copy exits, its state disappears.

Installation, API, configuration and test instructions are in the central manual and Wiki.

Events and requests

Inside a connected Hub, use the same stable reference for state, events and requests:

battery = hub.var("battery")
stop = battery.watch_value(lambda value: print("State:", value))
subscription = await battery.sub(lambda value: print("Event:", value))
responder = await battery.handle(lambda _: battery.get(0))
await battery.set(80)
await battery.pub(81)  # Independent event; local state remains 80.
print(await battery.req())  # Omitted request data is JSON null.
await hub.drain(timeout=5)
stop()

pub/sub/req alias publish/subscribe/request. Message callbacks accept data by default; use with_context=True for topic, Headers and explicit replies. Events require an active connection and are not replayed. request_many collects bounded replies; handle automatically replies with its return value. See messaging API and the runnable example.

Issues and feedback: GitHub Issues · License

Metadata

Release files for kinopio-hub 3.0.0

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

Source distribution (sdist)

Source distribution for kinopio-hub 3.0.0
File Size Uploaded Provenance Actions
kinopio_hub-3.0.0.tar.gz 153.2 kB Without provenance Details for kinopio_hub-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kinopio-hub 3.0.0
File Interpreter ABI Platform Actions
kinopio_hub-3.0.0-py3-none-any.whl Python 3 none any Details for kinopio_hub-3.0.0-py3-none-any.whl

Total release size: 216.4 kB

Release files / kinopio_hub-3.0.0.tar.gz

Download URL kinopio_hub-3.0.0.tar.gz
Size 153.2 kB
Tags Source
SHA-256 checksum
How to use checksums
54a0f1b804008bdb8646a8fe7f362d310066b329e387845428a1095b1cba1a98
BLAKE2b-256 checksum
How to use checksums
18f78c3961047d766144c52d477edb3f166e72bfa322060bbe3449846ec56359
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / kinopio_hub-3.0.0-py3-none-any.whl

Download URL kinopio_hub-3.0.0-py3-none-any.whl
Size 63.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
387984ac96bb38d8dcc46d5b9f107a6238390e31e2061269dfce4fa5ce4a31c3
BLAKE2b-256 checksum
How to use checksums
dff1a89160bc30427573e40819ef6832311803aa9f2df53b630efebaae57db4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for kinopio-hub 3.0.0

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.

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