Neon3 Python SDK
Python client SDK for the Neon3 control-plane protocol. Talks the same
neon3.rpc wire contract as the Rust and Node SDKs over loopback TCP.
Install
pip install neon3-sdk
Or from source:
cd packages/python-sdk
pip install -e .
Quick start (facade, recommended)
from neon3_sdk import start, mount, state, on
with start(mode="windowed", origin="demo"):
mount("counter.nui")
count = state(0)
@on("btn.increment")
def _():
count.value += 1
run()
Renderer features
with start() as app:
mount("audio.nui")
# Shader events (GPU -> CPU)
@app.shader.on(0x5F3759DF)
def _(payload):
print("energy:", payload[0])
# View extras (60 Hz throttled)
app.renderer.view_extras([0.1, 0.2, 0.3, 0.4])
# Animation control
app.anim.seek("hero.timeline", progress=0.5)
# Offscreen screenshot
png = app.surface.render("hello.nui", size=(1280, 720))
png.save("out.png")
Low-level API
from neon3_sdk import NeonClient, RenderClient, UiSession
client = NeonClient.connect("127.0.0.1:39102", origin="demo")
session = UiSession(client)
program = session.mount_flow(open("hello.nui").read())
render = RenderClient(NeonClient.connect("127.0.0.1:39103", origin="demo"))
render.set_view_extras([[0.1, 0.2, 0.3, 0.4]])
render.animation_pause("hero.timeline")
Constants & enums
from neon3_sdk import service, method, AnimationAction
client.call(service.WGPU_RUNTIME, method.WGPU_UI_SET_VIEW_EXTRAS, {...})
client.call(service.WGPU_RUNTIME, AnimationAction.PAUSE.method(), {...})
Logging
from neon3_sdk.log import configure
configure("debug") # or NEON3_LOG_LEVEL=debug env var
Error hierarchy
NeonError
├── TransportError # TCP / timeout (retryable)
├── ProtocolError # framing / envelope violation
├── RemoteError # runtime rejected the RPC
├── CapabilityError # missing required capability
├── StaleRevisionError # revision mismatch (retryable)
└── ...
Testing
python -m unittest discover -s tests
Version
- SDK 0.1.6 → runtime v0.2.10
- See
CHANGELOG.mdfor the full compatibility matrix.
Metadata
Release files for neon3-sdk 0.1.6
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 | |
|---|---|---|---|---|
| neon3_sdk-0.1.6.tar.gz | 89.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| neon3_sdk-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 170.1 kB
Release files / neon3_sdk-0.1.6.tar.gz
| Download URL | neon3_sdk-0.1.6.tar.gz |
|---|---|
| Size | 89.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b13267e35ad7305926210fe90f0ca176d1f7ee91f2660104187462c71c02272
|
|
BLAKE2b-256 checksum How to use checksums |
1d9364c4085a73885ed56c5916d768648111dc4850456e07a1f660160d924031
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / neon3_sdk-0.1.6-py3-none-any.whl
| Download URL | neon3_sdk-0.1.6-py3-none-any.whl |
|---|---|
| Size | 80.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a59a40296de26fedd990b3f0fc056368f91cc64a04d6964f5e2059880d12bdf2
|
|
BLAKE2b-256 checksum How to use checksums |
86049abf2753e97f9fbb61cd8551ae3f51a8c3dea5519f6655757baa32638354
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for neon3-sdk 0.1.6
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.