Generic server-authoritative sync library for ASGI apps (Starlette, FastAPI)
Project description
lab-link Python
Starlette/Pydantic backend runtime and Python sync client for lab-link.
Bind a reactive state model, expose a WebSocket sync endpoint, run commands
with hardware side effects, broadcast versioned JSON Patch updates, or control
a lab-link server from Python.
uv add lab-link
from lab_link import LabSync, ReactiveModel
class AppState(ReactiveModel):
voltage: float = 0.0
sync = LabSync()
state = sync.bind_state(AppState())
@sync.command
def set_voltage(value: float):
state.voltage = round(value, 3) # validated, batched, broadcast
app = sync.create_app()
from lab_link import LabLinkClient
with LabLinkClient("ws://127.0.0.1:8000/sync/ws") as sync:
snapshot = sync.snapshot()
ack = sync.send_command("set_voltage", {"value": 1.2})
Full docs: https://sansseriff.github.io/lab-link/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lab_link-0.3.0.tar.gz.
File metadata
- Download URL: lab_link-0.3.0.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2919eba31c928e0567950fa46aeff17262dac8538bbf4a301db192521bb1954a
|
|
| MD5 |
2f1359c88ac040d444c9d3a8765b9335
|
|
| BLAKE2b-256 |
71231fe062ded022886ca26271bd6aba79edabdb40ee54d70960129992397ada
|
Provenance
The following attestation bundles were made for lab_link-0.3.0.tar.gz:
Publisher:
publish-python.yml on sansseriff/lab-link
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lab_link-0.3.0.tar.gz -
Subject digest:
2919eba31c928e0567950fa46aeff17262dac8538bbf4a301db192521bb1954a - Sigstore transparency entry: 1797804400
- Sigstore integration time:
-
Permalink:
sansseriff/lab-link@b899cada4112e5ab167904c183c274d4f6918846 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/sansseriff
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@b899cada4112e5ab167904c183c274d4f6918846 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lab_link-0.3.0-py3-none-any.whl.
File metadata
- Download URL: lab_link-0.3.0-py3-none-any.whl
- Upload date:
- Size: 24.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9337c666c3e085a6aa32cd56e949b8c9b823681fe2470a70f883683339a2500b
|
|
| MD5 |
995790aa4bab61ac6f0c45bb0162a847
|
|
| BLAKE2b-256 |
520e25ae4b36030a42b958203c36446ba82c29924939ca59f9f5c7aeaeeee81e
|
Provenance
The following attestation bundles were made for lab_link-0.3.0-py3-none-any.whl:
Publisher:
publish-python.yml on sansseriff/lab-link
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lab_link-0.3.0-py3-none-any.whl -
Subject digest:
9337c666c3e085a6aa32cd56e949b8c9b823681fe2470a70f883683339a2500b - Sigstore transparency entry: 1797804580
- Sigstore integration time:
-
Permalink:
sansseriff/lab-link@b899cada4112e5ab167904c183c274d4f6918846 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/sansseriff
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@b899cada4112e5ab167904c183c274d4f6918846 -
Trigger Event:
push
-
Statement type: