Skip to main content

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 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.

Project details


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.1.tar.gz (3.5 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.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: msw_plugin_api-0.2.1.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

Hashes for msw_plugin_api-0.2.1.tar.gz
Algorithm Hash digest
SHA256 80c8929ea23050919af8e01087c2a82d277a4fbc97e175ea30e4b3ea7f5f73f9
MD5 0ef43c622b2dbed8d2c53b238b0d11cf
BLAKE2b-256 e8354b3f437c1a72717ab18379924e5d2ea24f381f5dab26d5732228fe5f51e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: msw_plugin_api-0.2.1-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

Hashes for msw_plugin_api-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a59170a4ddc3026738475d20707b45e8f1e47ba1b4385b952b5a4ee957cb4a20
MD5 6a660104830830db6316ae96e4ab7141
BLAKE2b-256 6798e3b674c1e3a55e4726fa73ad1744b9915d21a5e562f717442bf52e7a29c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page