Skip to main content

Typed Python SDK for the Modulector API.

Project description

Modulector SDK

Typed Python SDK for the Modulector API. The package contains client helpers for querying miRNA target interactions, miRNA aliases, methylation sites, disease associations, drug associations, and PubMed subscriptions without installing the Django backend dependencies.

Installation

pip install modulector-sdk

Usage

from modulector_sdk import get_mirna_details, get_mirna_target_interactions

details = get_mirna_details("hsa-miR-21-5p")
interactions = get_mirna_target_interactions(
    mirna="hsa-miR-21-5p",
    gene="PTEN",
    include_pubmeds=True,
)

Set MODULECTOR_API_BASE_URL to target a different Modulector deployment:

MODULECTOR_API_BASE_URL=https://your-modulector.example.org python script.py

Every service function also accepts a base_url keyword argument for per-request overrides.

MCP server

The SDK also installs a Model Context Protocol server that exposes the same service functions as LLM-callable tools.

For local stdio MCP clients:

modulector-mcp

Example client configuration:

{
  "mcpServers": {
    "modulector": {
      "command": "modulector-mcp"
    }
  }
}

For Streamable HTTP clients:

modulector-mcp --transport streamable-http --host 127.0.0.1 --port 8000

Then connect the client to http://127.0.0.1:8000/mcp.

The server includes tools for miRNA target interactions, miRNA details and aliases, miRNA identifier resolution, methylation site lookup and annotation, disease associations, drug associations, and PubMed news subscriptions. Use MODULECTOR_API_BASE_URL or each tool's base_url argument to target a custom Modulector deployment.

Development

Build this SDK from the sdk/ directory:

uv build

The generated source distribution and wheel are written to sdk/dist/.

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

modulector_sdk-2.4.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

modulector_sdk-2.4.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file modulector_sdk-2.4.0.tar.gz.

File metadata

  • Download URL: modulector_sdk-2.4.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.23

File hashes

Hashes for modulector_sdk-2.4.0.tar.gz
Algorithm Hash digest
SHA256 057a8543aa6bc84726495e24da81e3440a5a8e06da9833887962d5ad77eb2cef
MD5 1cb3b22ceab1368ce6c0f4271bc106ee
BLAKE2b-256 84f93254b830b9991526160958bf37907a9eafe00f3ed40f1213401ebf5c4561

See more details on using hashes here.

File details

Details for the file modulector_sdk-2.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for modulector_sdk-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb586f477f3ad77a42e5317c16cfc398816233406511532953383164d2ea8f46
MD5 1449af28354cdfa1954c94dcb35b8511
BLAKE2b-256 3b04610fef741297b1f8d2cd0b98845f49d5a36eb33db11876ed466298f0d64a

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