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, 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.1
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.1.tar.gz | 65.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mpt_extension_sdk-6.7.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 177.5 kB
Release files / mpt_extension_sdk-6.7.1.tar.gz
| Download URL | mpt_extension_sdk-6.7.1.tar.gz |
|---|---|
| Size | 65.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f7e2be7fca0e32685039204631d91d831a237839d6d56e83fd53bb56a361422
|
|
BLAKE2b-256 checksum How to use checksums |
ce0b9d7094ad9e94a7a5bbc005c304073a6fae97ae4f91346b38caa212993bb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.22
|
Release files / mpt_extension_sdk-6.7.1-py3-none-any.whl
| Download URL | mpt_extension_sdk-6.7.1-py3-none-any.whl |
|---|---|
| Size | 112.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
304352045b8491136b0afe5e0e3dd79b668daad770f82f75330d868605636cf6
|
|
BLAKE2b-256 checksum How to use checksums |
dbc21c27609a204c5550b9e83b21a4e5df6b8cdd9c8034ee808dc9cf9e72c8af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.22
|