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
WebhookResponseorWebhookError. - UI plugs: register
PlugRouterproviders, 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-monitorextra, and extension-defined spans withtrace_span. - CLI and metadata: the
mpt-extcommands andmeta.yamlgeneration/validation. - Marketplace services: use
ctx.mpt_api_servicefrom 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.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mpt_extension_sdk-6.10.0.tar.gz | 80.4 kB | Without provenance | Details for mpt_extension_sdk-6.10.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mpt_extension_sdk-6.10.0-py3-none-any.whl | Python 3 | none | any | Details for mpt_extension_sdk-6.10.0-py3-none-any.whl |
Total release size: 221.4 kB
Release files / mpt_extension_sdk-6.10.0.tar.gz
| Download URL | mpt_extension_sdk-6.10.0.tar.gz |
|---|---|
| Size | 80.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9a1dc53d2c7c5637589295fcc487bc55cafbe021436ec7354229e2034939bac
|
|
BLAKE2b-256 checksum How to use checksums |
69663f4583b4f8a6515b90ed9f96aad3ec1f431c72d625aee0b0def22bfbb5eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.22
|
Release files / mpt_extension_sdk-6.10.0-py3-none-any.whl
| Download URL | mpt_extension_sdk-6.10.0-py3-none-any.whl |
|---|---|
| Size | 141.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b8c7b09307a927286f2e75e58ebc4b709fad74b577537a73965beab3683b8c9
|
|
BLAKE2b-256 checksum How to use checksums |
aca13b4c5b1d6a195bf541bd6a3a2e13f867be1d786f6389a3f3d80904bcc0f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.22
|
Security for mpt-extension-sdk 6.10.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.