Skip to main content

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 PlugRouter providers, 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-monitor extra, and extension-defined spans with trace_span.
  • CLI and metadata: the mpt-ext commands and meta.yaml generation/validation.
  • Marketplace services: use ctx.mpt_api_service from 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 --local starts the local FastAPI + uvicorn runtime.
  • mpt-ext run writes meta.yaml, registers the extension instance, and starts the platform runtime with mrok/ziticorn.
  • mpt-ext meta generate writes metadata derived from ext_app.to_meta_config().
  • mpt-ext meta validate compares the checked-in meta.yaml with generated metadata, validates plug static assets, and writes meta.generated.yaml when 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.1.tar.gz (56.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mpt_extension_sdk-6.6.1-py3-none-any.whl (97.0 kB view details)

Uploaded Python 3

File details

Details for the file mpt_extension_sdk-6.6.1.tar.gz.

File metadata

  • Download URL: mpt_extension_sdk-6.6.1.tar.gz
  • Upload date:
  • Size: 56.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.22

File hashes

Hashes for mpt_extension_sdk-6.6.1.tar.gz
Algorithm Hash digest
SHA256 3897989b5015de7b71cac6b4be2ce9ed3afe7a80a26fc8ba8b04f1fd5fa8384e
MD5 e00a6f2002ad88f35df3d4e476988fb8
BLAKE2b-256 b2284cc1b6f09aa627315653811c47a9d0f2832fbdc1ea76ef4d71d3313fb9cd

See more details on using hashes here.

File details

Details for the file mpt_extension_sdk-6.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mpt_extension_sdk-6.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 701a87ce5bd59e0b6ea5f176051ce7770963453bac12116eb279fb9331c106ad
MD5 e795ed4aa9f7332a03cc8371a110c44a
BLAKE2b-256 2d88d36ec7dff051f09e3c205907ff98f6b87a29586530f58e9edaeb92e64662

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page