Minimal structural interfaces for MSW plugin packages
Project description
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.
Project details
Release history Release notifications | RSS feed
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 msw_plugin_api-0.2.2.tar.gz.
File metadata
- Download URL: msw_plugin_api-0.2.2.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70e63f4c30b2df2ceaccfc444fedcb485aa53861187284029a707fb2c3fddc7d
|
|
| MD5 |
bfc02b69630571cefad3a11e8162165f
|
|
| BLAKE2b-256 |
ab5107fa5c56df0ed4ed77984905cfb23611a5e9e60cc35422ee0b95b76bcefb
|
File details
Details for the file msw_plugin_api-0.2.2-py3-none-any.whl.
File metadata
- Download URL: msw_plugin_api-0.2.2-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1a0a32f9ca4528a41949f90d56a94af2683a967b835d51f054ab4c266aab8f0
|
|
| MD5 |
d69aa25ff1086e6c77b88322005dcf0f
|
|
| BLAKE2b-256 |
3a29fc014f175f011bc18a2a5e7f5666819fb163d74e7bb6dc0cac66ef2f0383
|