Skip to main content

SDK Usage

This guide is the entry point for building an extension package on top of mpt-extension-sdk. Topic-specific examples live in smaller documents under sdk_usage/.

Usage Topics

  • Extension application: install the SDK, shape an extension package, create ExtensionApp, include routers, register startup hooks, and configure the runtime.
  • Event routes: register task and non-task event handlers.
  • Schedule routes: register periodic work and read the schedule delivery.
  • Task-based execution: handler outcomes, task reporting, time limits, and the delivery protocol shared by schedules, task-backed events, and deferred API calls.
  • Authenticated API routes: expose authenticated endpoints, validate bodies, read request/auth context, return API responses, and use pagination.
  • Webhook routes: declare platform webhooks, read the typed order, account or request context, and answer with WebhookResponse or WebhookError.
  • UI plugs: register PlugRouter providers, group plugs under nested navigation containers, declare modal (open-by-id) plugs, and reference static assets.
  • Contexts and pipelines: adapt execution contexts, compose pipelines, drive the step lifecycle and flow control, use pipeline hooks, and declare status transitions.
  • Immutable snapshots: treat MPT models as immutable, update parameters with the with_* helpers, and refresh after a write.
  • Error handling: raise typed step/pipeline errors and let the SDK map them to event responses or task transitions.
  • Settings: the runtime, extension, and account settings layers and the environment-variable helpers.
  • Observability: SDK tracing, the azure-monitor extra, and extension-defined spans with trace_span.
  • CLI and metadata: the mpt-ext commands and meta.yaml generation/validation.
  • Marketplace services: use ctx.mpt_api_service from handlers and pipeline steps.

Runtime Commands

An extension built on the SDK is run through the packaged mpt-ext CLI. The commands and their contract are documented in CLI and metadata.

Metadata

Release files for mpt-extension-sdk 6.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mpt-extension-sdk 6.11.0
File Size Uploaded Provenance Actions
mpt_extension_sdk-6.11.0.tar.gz 80.4 kB Without provenance Details for mpt_extension_sdk-6.11.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mpt-extension-sdk 6.11.0
File Interpreter ABI Platform Actions
mpt_extension_sdk-6.11.0-py3-none-any.whl Python 3 none any Details for mpt_extension_sdk-6.11.0-py3-none-any.whl

Total release size: 221.4 kB

Release files / mpt_extension_sdk-6.11.0.tar.gz

Download URL mpt_extension_sdk-6.11.0.tar.gz
Size 80.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f8db9dbab053fa33d19c6ea9bb53c088bae9875a1c70ae0e670db01545b1700b
BLAKE2b-256 checksum
How to use checksums
a27132012e503048470e79ae3ff8a7bbdaa4767b09da8c90fd40d3fb3c5e5e59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.22

Release files / mpt_extension_sdk-6.11.0-py3-none-any.whl

Download URL mpt_extension_sdk-6.11.0-py3-none-any.whl
Size 141.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05eaa5ebb64ed07eeb11a3f8626e4921c938fb3ee216c41e3266dd73db759fa4
BLAKE2b-256 checksum
How to use checksums
31bca0e2cb1e3ca77198556b8e18e48d0c6da9fb58c5beb86799e84ca0d53188
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.22

Security for mpt-extension-sdk 6.11.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

6.11.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page