Skip to main content

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()

Persistent remote access is available through LanPassphraseAuth and SQLiteAuthStore, including first-run setup, remembered devices, one-time invitations, session revocation, and scoped API tokens.

from lab_link import LabLinkClient

with LabLinkClient("ws://127.0.0.1:8000/sync/ws", api_token=token) as sync:
    snapshot = sync.snapshot()
    ack = sync.send_command("set_voltage", {"value": 1.2})

Full docs: https://sansseriff.github.io/lab-link/

Metadata

Release files for lab-link 0.5.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 lab-link 0.5.0
File Size Uploaded Provenance Actions
lab_link-0.5.0.tar.gz 29.8 kB With provenance Details for lab_link-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lab-link 0.5.0
File Interpreter ABI Platform Actions
lab_link-0.5.0-py3-none-any.whl Python 3 none any Details for lab_link-0.5.0-py3-none-any.whl

Total release size: 64.7 kB

Security for lab-link 0.5.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

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