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.3.tar.gz (3.6 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.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: msw_plugin_api-0.2.3.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for msw_plugin_api-0.2.3.tar.gz
Algorithm Hash digest
SHA256 1b2f8be90dbb26a731443018d335ad71be6dcac61e8de06cc5b5bbd0916089a1
MD5 3dc0b2a40e6af486bed5cc307590029b
BLAKE2b-256 f17ae39e123e202a41e765333ab2ecadde0f52ae1f7fe807455c82e7d6687409

See more details on using hashes here.

Provenance

The following attestation bundles were made for msw_plugin_api-0.2.3.tar.gz:

Publisher: release.yml on MurineShiftWork/msw-plugin-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: msw_plugin_api-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for msw_plugin_api-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 59edc292b85afa724d81a1d0fa73796ca413de263ca67f7550b1d20a78522b2c
MD5 fb9b583c2cdec37a23b5d65f289e910f
BLAKE2b-256 7de8954e8d91f94b2e24584b9bd0edebadd967497fa54678d65c8c0486412b86

See more details on using hashes here.

Provenance

The following attestation bundles were made for msw_plugin_api-0.2.3-py3-none-any.whl:

Publisher: release.yml on MurineShiftWork/msw-plugin-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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