veyron-sdk
Python SDK for writing Veyron plugins.
A Veyron plugin is a separate OS process supervised by the Veyron kernel. It talks to the kernel over a Unix domain socket using the Veyron wire protocol: framed messages carrying Protobuf envelopes, with optional zstd compression, HMAC-SHA256 frame authentication, and fragmentation.
Protocol source
proto/veyron_protocol.proto is vendored from
veyron-wire's wire/proto/. It's
copied by hand, not path-referenced — re-sync it when the protocol changes
upstream, then regenerate veyron/veyron_protocol_pb2.py.
Install
pip install veyron-sdk
Quick start
import asyncio
import json
from veyron import Plugin
from veyron.veyron_protocol_pb2 import ActionResponse, ActionStatus, Envelope, PluginManifest
class EchoPlugin(Plugin):
plugin_id = "echo-plugin"
manifest = PluginManifest(actions=["echo"])
async def on_message(self, envelope: Envelope) -> None:
if envelope.WhichOneof("payload") != "action_request":
return
req = envelope.action_request
resp = ActionResponse(
action_id=req.action_id,
status=ActionStatus.ACTION_OK,
data_json=json.dumps({"echo": json.loads(req.params_json or b"{}")}).encode(),
)
out = Envelope(sender_id=self.plugin_id)
out.action_response.CopyFrom(resp)
await self._client.send("kernel", out)
if __name__ == "__main__":
asyncio.run(EchoPlugin().run())
Plugin.run connects, registers, and serves until the kernel asks the plugin
to shut down. The SDK answers Ping automatically and exits the loop on
PluginShutdown. See examples/echo_plugin.py for a fuller example with
event subscription.
Environment
| Variable | Meaning |
|---|---|
VEYRON_SOCKET_PATH |
Kernel UDS path. Default: XDG_RUNTIME_DIR → /run/user/<uid> → ~/.veyron/run (never shared /tmp). |
VEYRON_JWT_TOKEN |
JWT presented at registration (required on secured kernels). |
VEYRON_JWT_SECRET |
Shared secret; enables per-frame HMAC-SHA256 tags after registration. |
Protocol coverage
The SDK's framing module implements the full Veyron wire format described
in docs/FRAMING.md: HMAC-tagged frames, zstd decompression for payloads
compressed by the kernel, and reassembly of fragmented messages.
Development
pip install -e ".[dev]"
pytest
License
MIT
Metadata
Release files for veyron-sdk 0.1.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 | Actions |
|---|---|---|---|---|
| veyron_sdk-0.1.1.tar.gz | 17.7 kB | Without provenance | Details for veyron_sdk-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| veyron_sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for veyron_sdk-0.1.1-py3-none-any.whl |
Total release size: 32.4 kB
Release files / veyron_sdk-0.1.1.tar.gz
| Download URL | veyron_sdk-0.1.1.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06e7dcaf1d57789f440bd9b745bb22bd3dc0d71ddc59b56db33b52550f7ed9ce
|
|
BLAKE2b-256 checksum How to use checksums |
d1f995f8981d2c9858c63a2504d833cc0ed5ba54567ac6989c4232bbefbe281d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / veyron_sdk-0.1.1-py3-none-any.whl
| Download URL | veyron_sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c99b76e3b53e15d60abd618297aad4d152426e3535b828bc084f68fdf6d1e244
|
|
BLAKE2b-256 checksum How to use checksums |
cb77701136b13bc3e28a2cce2162683f280d105fadd6ab86c84b2849f776dffd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Security for veyron-sdk 0.1.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.