msw-plugin-api
Minimal structural interfaces for MurineShiftWork plugin packages.
Zero dependencies (stdlib typing and dataclasses only). Provides:
HostSessionInfo— concrete dataclass plugins return after attachingHostSessionInfoProtocol—runtime_checkableProtocol for structural typingHostSessionProtocol—runtime_checkableProtocol for host session plugins
Usage
from msw_plugin_api import HostSessionInfo, HostSessionProtocol
class MyHostSession:
def attach(self, **kwargs) -> HostSessionInfo:
return HostSessionInfo(
backend="myplugin",
acquisition_name="subject__20260609_143022__ext",
subject="subject",
parent_directory="/data/recordings",
)
def start(self) -> None: ...
def stop(self) -> None: ...
Declare the plugin entry point in pyproject.toml:
[project.entry-points."msw.host"]
myplugin = "my_package.session:MyHostSession"
Plugin contract
MSW core checks isinstance(session, HostSessionProtocol) at dispatch time.
Plugins may implement the interface structurally (without importing this package)
or depend on msw-plugin-api explicitly for IDE support and test conformance checks.
Camera backends
A camera backend drives one group of cameras of a setup and registers under
the msw.camera entry-point group, named as the setup's backend: key:
[project.entry-points."msw.camera"]
flir_bonsai = "msw_flir_bonsai.msw:FlirBonsaiBackend"
The host calls configure(settings, units) once, then preflight(),
start(target), stop(reason) and close(). Each of preflight, start and
stop returns one UnitResult per camera: a backend reports a missing or failed
camera instead of raising, and the host decides whether that aborts the run.
configure raises CameraConfigError for invalid settings, so a broken setup
fails before any hardware starts. load_camera_backend(name) finds and creates
an installed backend.
A backend whose cameras can keep recording after the host dies may also
implement ResettableCameraBackend: reset() ends any recording left from an
earlier session, saves what it recorded and returns one UnitResult per camera.
The host calls it before a new session when the previous session's owner process
is dead. Backends without reset remain valid CameraBackends.
Metadata
Release files for msw-plugin-api 0.5.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 | Actions |
|---|---|---|---|---|
| msw_plugin_api-0.5.0.tar.gz | 7.8 kB | Without provenance | Details for msw_plugin_api-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| msw_plugin_api-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for msw_plugin_api-0.5.0-py3-none-any.whl |
Total release size: 17.8 kB
Release files / msw_plugin_api-0.5.0.tar.gz
| Download URL | msw_plugin_api-0.5.0.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
365a18655b36b95dc0f8f983d74cddee355efcfd4c6021a4a51472aeb4a3cd48
|
|
BLAKE2b-256 checksum How to use checksums |
00fc8ae3a69c2e6ce130e16431bb7c65ec378b22a1f419157a33d048b4194423
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / msw_plugin_api-0.5.0-py3-none-any.whl
| Download URL | msw_plugin_api-0.5.0-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b96e6b3a490d0e0a3b947d06ac528ad76ed35646a5fdfbdd21a6cec62c82849f
|
|
BLAKE2b-256 checksum How to use checksums |
6df6d7ec7bcf8ec2224cc99a1f928721773bf72c0c89ed9faa3007a703ac2a57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for msw-plugin-api 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.
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.