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
- Application setup: 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, read the schedule delivery, and follow the delivery protocol the Extension Framework drives.
- Authenticated API routes: expose authenticated endpoints, validate bodies, read request/auth context, return API responses, and use pagination.
- 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.
- 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.7.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mpt_extension_sdk-6.7.4.tar.gz | 66.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mpt_extension_sdk-6.7.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 179.7 kB
Release files / mpt_extension_sdk-6.7.4.tar.gz
| Download URL | mpt_extension_sdk-6.7.4.tar.gz |
|---|---|
| Size | 66.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
764b5049406c1f932969f7282eda98628b21e1de1a64deefd5337d719414bd08
|
|
BLAKE2b-256 checksum How to use checksums |
37e451323191c334ec9a93ad84d75ba35bc1115ae19689210294461a4c2e2c10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.22
|
Release files / mpt_extension_sdk-6.7.4-py3-none-any.whl
| Download URL | mpt_extension_sdk-6.7.4-py3-none-any.whl |
|---|---|
| Size | 113.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b22844c6f4fec22f7e239575d76b9ac703b4df12b5cd84e0458d57eb48bb2501
|
|
BLAKE2b-256 checksum How to use checksums |
cf6256ba68e6004ffd0c5eef0f6dcd1e1a8aeb74cba061a18c9e3ab46273e628
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.22
|