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 predicted and experimentally validated 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,
    get_mirna_target_validations,
)

details = get_mirna_details("hsa-miR-21-5p")
interactions = get_mirna_target_interactions(
    mirna="hsa-miR-21-5p",
    gene="PTEN",
    include_pubmeds=True,
)
validations = get_mirna_target_validations(
    mirna="hsa-miR-122-5p",
    target="SLC7A1",
    experiment="Western blot",
)

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 predicted and experimentally validated 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.

When deployed with the root Docker Compose stack, nginx proxies the MCP Streamable HTTP endpoint at https://<mydomain.com>/mcp.

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.6.0.tar.gz (13.9 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.6.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for modulector_sdk-2.6.0.tar.gz
Algorithm Hash digest
SHA256 f158fd7487a18f3352643fadbba85d58aeeca642bbdcbbb87576486b9592dc36
MD5 b7e541f1f7f842d288e7694ee4c0cac4
BLAKE2b-256 8ce67b3de104a95a5fd862a4e37d2d0766e7ad197c07dad831bdffee59347142

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for modulector_sdk-2.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e32f14f827ae5fabea3f74be1985602ff24dc82fd799a4e229d4360fb74983a
MD5 6399a0582ee5aa9fb415a8f2f726fc9f
BLAKE2b-256 a1f9a8f8f83f861fbe8a5ca7e177f5f851c60addd8f565c37d2189f7672b0dc6

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