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.

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.5.2.tar.gz (13.3 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.5.2-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for modulector_sdk-2.5.2.tar.gz
Algorithm Hash digest
SHA256 dc3f4f98a95d6aa835987468c98dddaee949882aeb27eb1591e6130e159034fc
MD5 d1a1dca5da150515dea962637d2fcfab
BLAKE2b-256 72b61d61adb1fbe20de2b2f07b07aea26f18a6684dd360b0702b592c54c36e3e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for modulector_sdk-2.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e96b339f32c4b0f8f078967d036ee382f6f62f473076daa3564760c2e4b372fb
MD5 53685bdbbbd58753d89d79c5dea6f176
BLAKE2b-256 657f42dd3f571517398698d5dc970f96e7696291630d5088a84a0d68c566f5ab

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