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.9.1

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.9.1
File Size Uploaded Provenance Actions
mpt_extension_sdk-6.9.1.tar.gz 80.3 kB Without provenance Details for mpt_extension_sdk-6.9.1.tar.gz

Built distribution (wheel)

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

Total release size: 221.2 kB

Release files / mpt_extension_sdk-6.9.1.tar.gz

Download URL mpt_extension_sdk-6.9.1.tar.gz
Size 80.3 kB
Tags Source
SHA-256 checksum
How to use checksums
684f465be58c17139626c54374d2cbbcc8cbc2ff1f8742b247893f4e070f821a
BLAKE2b-256 checksum
How to use checksums
72cf422bbf2bde5bccca8b11f70ad4907f58a85f96371deb84ead4817d49a6cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.22

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

Download URL mpt_extension_sdk-6.9.1-py3-none-any.whl
Size 140.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b26f921cf1f002b57b56e6e3b4c09ee7351c02a758477f524300703417d55fd7
BLAKE2b-256 checksum
How to use checksums
96cc9fda6d40334581a343a9478bcbc225222aa2015816de9b2cf4d54dcaffb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.22

Security for mpt-extension-sdk 6.9.1

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.9.1 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