MINT Plugin SDK - Build analysis plugins for the MINT (Mass-spec INtegrated Toolkit) platform
Project description
MINT SDK (Python)
SDK for building analysis plugins that integrate with the MINT platform.
Full Documentation: See the comprehensive docs for detailed API reference and guides.
Installation
# From PyPI (when published)
uv add mint-sdk
# From git
uv add git+https://github.com/MorscherLab/MINT#subdirectory=packages/sdk-python
Quick Start
Create a plugin by implementing the AnalysisPlugin interface:
from mint_sdk import AnalysisPlugin, PluginMetadata, PluginCapabilities
from fastapi import APIRouter
router = APIRouter()
@router.get("/hello")
async def hello():
return {"message": "Hello from my plugin!"}
class MyPlugin(AnalysisPlugin):
@property
def metadata(self) -> PluginMetadata:
return PluginMetadata(
name="My Plugin",
version="1.0.0",
description="My analysis plugin",
analysis_type="metabolomics",
routes_prefix="/my-plugin",
capabilities=PluginCapabilities(
requires_auth=True,
requires_experiments=True,
),
)
def get_routers(self):
return [(router, "")]
async def initialize(self, context=None):
self._context = context
async def shutdown(self):
pass
Plugin Package Structure
mint-plugin-example/
├── pyproject.toml
├── README.md
└── src/mint_plugin_example/
├── __init__.py
└── plugin.py
pyproject.toml
[project]
name = "mint-plugin-example"
version = "1.0.0"
dependencies = ["mint-sdk>=1.0.0"]
[project.entry-points."mint.plugins"]
example = "mint_plugin_example.plugin:MyPlugin"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/mint_plugin_example"]
The entry point mint.plugins is how the platform discovers your plugin.
Platform Context
When running integrated with the platform, your plugin receives a PlatformContext that provides access to:
- Authentication dependencies (
get_current_user_dependency()) - Repositories for experiments, samples, users, etc.
- Platform configuration
async def initialize(self, context=None):
self._context = context
if context:
# Running integrated - use platform services
self.experiment_repo = context.get_experiment_repository()
else:
# Running standalone
pass
Installation Commands
# Install from GitHub
uv add git+https://github.com/org/mint-plugin-example
# Install specific version
uv add git+https://github.com/org/mint-plugin-example@v1.0.0
# Install from PyPI
uv add mint-plugin-example
# Install local plugin for development
uv add --editable ./my-plugin
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 mint_sdk-1.0.0b2.tar.gz.
File metadata
- Download URL: mint_sdk-1.0.0b2.tar.gz
- Upload date:
- Size: 177.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","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 |
823061eb5e061e84b0faef93fb2caddbdcedd8f7a9eba041b924ac0cf581da25
|
|
| MD5 |
a42246ac625787af0ff3ea5a1577e587
|
|
| BLAKE2b-256 |
f83bbcc354a5551cc78e0fc3492d9a53e8fb00611aa1ca1cafc62581488100a6
|
File details
Details for the file mint_sdk-1.0.0b2-py3-none-any.whl.
File metadata
- Download URL: mint_sdk-1.0.0b2-py3-none-any.whl
- Upload date:
- Size: 142.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","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 |
81ea2d6382f0ab6d28198732badbb115e37d79e17d7342da5f9036bebf0ec426
|
|
| MD5 |
7db8e97c6bc273d3152b49f69543cf55
|
|
| BLAKE2b-256 |
3cb222923595dfbb91b05deee6c354fa39cb3a4e268331ae2fb07794a7f1d3d0
|