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 (and the status of schedule routes).
- 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
Use the mpt-ext CLI command when running an extension built on top of the SDK:
mpt-ext run --local
mpt-ext run
mpt-ext meta generate
mpt-ext meta validate
mpt-ext run --localstarts the localFastAPI + uvicornruntime.mpt-ext runwritesmeta.yaml, registers the extension instance, and starts the platform runtime withmrok/ziticorn.mpt-ext meta generatewrites metadata derived fromext_app.to_meta_config().mpt-ext meta validatecompares the checked-inmeta.yamlwith generated metadata, validates plug static assets, and writesmeta.generated.yamlwhen validation fails.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mpt_extension_sdk-6.6.2.tar.gz
(58.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mpt_extension_sdk-6.6.2.tar.gz.
File metadata
- Download URL: mpt_extension_sdk-6.6.2.tar.gz
- Upload date:
- Size: 58.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.7.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3e26e343544b3783c0b336036cfa7d7974a5679d7767602957018bc5aefdf83
|
|
| MD5 |
9dd3ffde468f59eca0c3ac9fdca1939f
|
|
| BLAKE2b-256 |
48d9a2546e29e99633039ae0215c251ed5c18ef9255416081f4000aba4ac6114
|
File details
Details for the file mpt_extension_sdk-6.6.2-py3-none-any.whl.
File metadata
- Download URL: mpt_extension_sdk-6.6.2-py3-none-any.whl
- Upload date:
- Size: 100.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.7.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9da3b0f1571f660bba9438f5d8241be6e9eb08ab859d7b5c76e64d27c0d7c17
|
|
| MD5 |
d3e7a6a9c1004c27b82374d1195b92d2
|
|
| BLAKE2b-256 |
b921bf8125d790869f20e42e68b6813025a447cfa0c253a4bc3a5ce747ca5fa8
|