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.3
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.3.tar.gz | 66.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mpt_extension_sdk-6.7.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 179.6 kB
Release files / mpt_extension_sdk-6.7.3.tar.gz
| Download URL | mpt_extension_sdk-6.7.3.tar.gz |
|---|---|
| Size | 66.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a81d939a30c77bc9444482de1cd15ed6a860c381a033e7599cf487bf30f92238
|
|
BLAKE2b-256 checksum How to use checksums |
100ca7ffc4d94ba1b117ecb9968e84a68109787eef806a6d5dd3c03a465a57d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.22
|
Release files / mpt_extension_sdk-6.7.3-py3-none-any.whl
| Download URL | mpt_extension_sdk-6.7.3-py3-none-any.whl |
|---|---|
| Size | 113.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2fa764091dc3dd05dc4168ccb6b806495396660de696cc47a792e9c67ab53580
|
|
BLAKE2b-256 checksum How to use checksums |
9e9217bd62ac10b3597780ecd1ca037b4f66746c8427562a75a712ef81b8a08d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.22
|