Async Python library to discover and manage lab devices (pump, valve, densitometer).
Project description
lab_devices
Async Python library to discover and manage lab devices — peristaltic pumps, distribution valves, and densitometers — over the SerialHop / lab-bridge API.
Install
pip install bioexperiment-lab-devices # import as: import lab_devices
For development (runtime + dev deps):
poetry install --all-extras
# or, without Poetry:
pip install -e ".[dev]"
Core usage (host + port)
import asyncio
from lab_devices import LabClient
async def main():
async with LabClient("chisel", 8089) as lab:
pump = lab.pump(1)
job = await pump.dispense(volume_ml=10, speed_ml_min=3.0)
result = await job.result()
print(result.dispensed_ml)
asyncio.run(main())
Server-only discovery (inside labnet)
from lab_devices.discovery import LabRegistry
async with LabRegistry() as reg: # LAB_DEVICES_DISCOVERY_URL overrides the endpoint
print(await reg.list_labs())
lab = await reg.connect("khamit_desktop")
async with lab:
await lab.densitometer(1).measure()
Discovery uses the internal, unauthenticated roster endpoint and needs no token. It only works from inside the lab-bridge network.
Development
poetry run pytest # hermetic; no hardware needed
poetry run mypy
poetry run ruff check .
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 bioexperiment_lab_devices-0.1.1.tar.gz.
File metadata
- Download URL: bioexperiment_lab_devices-0.1.1.tar.gz
- Upload date:
- Size: 42.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca92ea9c3563f33b80c239758ca605deb3feeeb60f32b1c67dcc41d50ee05404
|
|
| MD5 |
c015edc66d206a32980079b49146bb28
|
|
| BLAKE2b-256 |
396308270e0c2d25f6238b4e040612c4d471576206ef9a7deed39291bb555a87
|
Provenance
The following attestation bundles were made for bioexperiment_lab_devices-0.1.1.tar.gz:
Publisher:
release-please.yml on bioexperiment-lab-devices/lab-devices
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bioexperiment_lab_devices-0.1.1.tar.gz -
Subject digest:
ca92ea9c3563f33b80c239758ca605deb3feeeb60f32b1c67dcc41d50ee05404 - Sigstore transparency entry: 2129869632
- Sigstore integration time:
-
Permalink:
bioexperiment-lab-devices/lab-devices@9073b4e387b66137eaece4dea4ad99e28540d19c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bioexperiment-lab-devices
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yml@9073b4e387b66137eaece4dea4ad99e28540d19c -
Trigger Event:
push
-
Statement type:
File details
Details for the file bioexperiment_lab_devices-0.1.1-py3-none-any.whl.
File metadata
- Download URL: bioexperiment_lab_devices-0.1.1-py3-none-any.whl
- Upload date:
- Size: 59.5 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 |
643a77d87926446d58d1c7ff28f826ca9737295f7730970fc2fb91a3f0c83415
|
|
| MD5 |
cc55ec149332ff45758e9a94f1c3d211
|
|
| BLAKE2b-256 |
5293da619c6750b60e518f3ba85c6daf49c06890ba887501e59054355a199150
|
Provenance
The following attestation bundles were made for bioexperiment_lab_devices-0.1.1-py3-none-any.whl:
Publisher:
release-please.yml on bioexperiment-lab-devices/lab-devices
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bioexperiment_lab_devices-0.1.1-py3-none-any.whl -
Subject digest:
643a77d87926446d58d1c7ff28f826ca9737295f7730970fc2fb91a3f0c83415 - Sigstore transparency entry: 2129869682
- Sigstore integration time:
-
Permalink:
bioexperiment-lab-devices/lab-devices@9073b4e387b66137eaece4dea4ad99e28540d19c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bioexperiment-lab-devices
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yml@9073b4e387b66137eaece4dea4ad99e28540d19c -
Trigger Event:
push
-
Statement type: