Skip to main content

msw-plugin-api

Minimal structural interfaces for MurineShiftWork plugin packages.

Zero dependencies (stdlib typing and dataclasses only). Provides:

  • HostSessionInfo — concrete dataclass plugins return after attaching
  • HostSessionInfoProtocol — runtime_checkable Protocol for structural typing
  • HostSessionProtocol — runtime_checkable Protocol 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.

Metadata

Release files for msw-plugin-api 0.4.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 msw-plugin-api 0.4.0
File Size Uploaded Provenance Actions
msw_plugin_api-0.4.0.tar.gz 7.4 kB Without provenance Details for msw_plugin_api-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for msw-plugin-api 0.4.0
File Interpreter ABI Platform Actions
msw_plugin_api-0.4.0-py3-none-any.whl Python 3 none any Details for msw_plugin_api-0.4.0-py3-none-any.whl

Total release size: 16.9 kB

Release files / msw_plugin_api-0.4.0.tar.gz

Download URL msw_plugin_api-0.4.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0f2899b6f1397ad71b6e96e837d8d329bc2f83ddcfb012e420cce0ea9328044a
BLAKE2b-256 checksum
How to use checksums
40c70712774c3cfe49fa26e53473505b645066e4a389276826e2c38a94b390c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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.4.0-py3-none-any.whl

Download URL msw_plugin_api-0.4.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f19ca1affe1ef35f3178a349b7075940a514130f93d77a55f4cbd937fe564cc7
BLAKE2b-256 checksum
How to use checksums
5c220080614a464701995806838f36cd6f104202445a952b09f17cff6faf2332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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.4.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.

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