EduceLab Devices
educelab-devices provides Python APIs for the imaging hardware used across
EduceLab projects: cameras, lights, turntables, gantries, and similar devices.
Device APIs are organized by hardware type (e.g. educelab.devices.cameras,
educelab.devices.lights) and are kept as simple and dependency-light as
possible so they can be wrapped by any consumer (CLI scripts, Qt applications,
etc.).
Installation
Install from PyPI:
pip install educelab-devices
pip install "educelab-devices[all]" # with every PyPI-hosted backend SDK
The core package needs only numpy and includes a simulated device for every role. Each hardware backend's SDK is an optional extra, imported only when that backend is used:
| Extra | Backend | Added by |
|---|---|---|
serial |
MISHA, XLC lights, X-Carve (pyserial) | MISHA lights track |
foldio360 |
Foldio360 turntable (bleak) | Foldio360 track |
gphoto2 |
DSLRs over gphoto2 (not on Windows) | gphoto2 camera track |
acroname |
Acroname USB hubs (brainstem) | Acroname hub track |
all |
All of the above | first driver track |
Extras are declared as their driver lands. Spinnaker cameras need PySpin, which isn't on PyPI: install the Spinnaker SDK, then the wheel bundled with it (the versions must match exactly).
Usage
from educelab.devices.stages import SimulatedStage
with SimulatedStage() as stage:
stage.move_to({"x": 100.0, "y": 50.0})
print(stage.position())
See docs/guide.md for how every device behaves (lifecycle, threading, errors, events) and docs/hardware/ for what we know about each piece of hardware.
Command line
el-devices (or python -m educelab.devices) checks hardware by hand:
el-devices discover # list devices the installed backends can find
el-devices misha # light each band of the attached MISHA panel
el-devices simulate # exercise every simulated device
el-devices simulate stage light # ...or only some roles
el-devices -v <command> # log device traffic
Each driver adds a subcommand for its manual hardware check.
Development
Either pip or uv can be used.
With pip (25.1+):
python -m venv .venv
source .venv/bin/activate
pip install -e . --group dev
pytest
ruff check . && ruff format .
With uv:
uv run pytest
uv run ruff check . && uv run ruff format .
Also available:
pytest -m hardware # tests that need real hardware attached
pytest --cov # coverage report
mypy # type check (advisory in CI)
Releasing
Pushing a vX.Y.Z tag publishes that release to PyPI through
.github/workflows/publish.yml, using PyPI trusted publishing (no API token).
- Bump
versioninpyproject.tomland merge it tomainthrough a PR. - Tag the merge commit and push the tag:
git tag vX.Y.Z git push origin vX.Y.Z
The workflow fails without publishing if the tag doesn't match the version in
pyproject.toml. Running it by hand from the Actions tab builds the
distributions without publishing them.
Publishing needs a one-time setup: a trusted publisher for educelab-devices
on PyPI (owner educelab, repository educelab-devices, workflow
publish.yml, environment pypi), and a pypi environment in the GitHub
repository's settings.
Project organization
- All package code goes in
src/educelab/devices, grouped into subpackages by hardware type. src/educelabmust not contain any files, including__init__.pyfiles.- Add runtime dependencies to
dependenciesinpyproject.tomland development tools to[dependency-groups]. - Tests go in
tests/. Shared role contract tests are intests/contracts/.
Metadata
Release files for educelab-devices 0.1.0
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 | |
|---|---|---|---|---|
| educelab_devices-0.1.0.tar.gz | 160.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| educelab_devices-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 271.0 kB
Release files / educelab_devices-0.1.0.tar.gz
| Download URL | educelab_devices-0.1.0.tar.gz |
|---|---|
| Size | 160.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e50a746b4411871e48bf2121129e843445dbff3bc2dabcc5f25756ba66c422e3
|
|
BLAKE2b-256 checksum How to use checksums |
f21c4a36db069f74a51a544d09ec800c9373640e2ff6f4e0fab3148177ecf970
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logRelease files / educelab_devices-0.1.0-py3-none-any.whl
| Download URL | educelab_devices-0.1.0-py3-none-any.whl |
|---|---|
| Size | 110.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35ec8178858776c5afb4e21759e7e78943935ba64bf433ce098cd62b19b430ed
|
|
BLAKE2b-256 checksum How to use checksums |
3d3f986c804084d2edc6f208b84eacb893b767738e4414bdf8d8f9149a496d0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logSecurity for educelab-devices 0.1.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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for educelab_devices-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logA 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.