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
  • HostSessionInfoProtocolruntime_checkable Protocol for structural typing
  • HostSessionProtocolruntime_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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

msw_plugin_api-0.2.4.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

msw_plugin_api-0.2.4-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file msw_plugin_api-0.2.4.tar.gz.

File metadata

  • Download URL: msw_plugin_api-0.2.4.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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

Hashes for msw_plugin_api-0.2.4.tar.gz
Algorithm Hash digest
SHA256 4a1f85f9e423aaa8c4b46f1cb47ec4a56cffd72094095593efa8bee51b2bfd14
MD5 615486534a5adcee9a17206bbfa4da9d
BLAKE2b-256 f13445464d009f6858f0d195d4c6e0bcceec4a66c2d669cc59a0c6f6723ec18b

See more details on using hashes here.

File details

Details for the file msw_plugin_api-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: msw_plugin_api-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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

Hashes for msw_plugin_api-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 85e5ad074236df88acd5e3701d994a42901b6955437cd00e62acc67e4f6a8d0d
MD5 21fd9a2cd20ccefc7911fc6c31b067b2
BLAKE2b-256 02f920da0764ae5ecd1d914fb0a26095a90d62e6538345b1bfca43e119723f09

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.0

2 files

This release

0.2.4 This release

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

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