Metadata-Version: 2.4
Name: mpt-extension-sdk
Version: 6.3.1
Summary: Extensions SDK for SoftwareONE Marketplace Platform
Author: SoftwareOne AG
License: Apache-2.0 license
License-File: LICENSE
Requires-Python: <4,>=3.12
Requires-Dist: fastapi[standard]==0.131.*
Requires-Dist: mpt-api-client==6.1.*
Requires-Dist: mrok==0.9.6
Requires-Dist: opentelemetry-api==1.40.0
Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.40.0
Requires-Dist: opentelemetry-instrumentation-fastapi==0.61b0
Requires-Dist: opentelemetry-instrumentation-httpx==0.61b0
Requires-Dist: opentelemetry-instrumentation-logging==0.61b0
Requires-Dist: opentelemetry-sdk==1.40.0
Requires-Dist: pydantic==2.13.*
Requires-Dist: typer==0.24.*
Provides-Extra: azure-monitor
Requires-Dist: azure-monitor-opentelemetry-exporter==1.0.0b51; extra == 'azure-monitor'
Description-Content-Type: text/markdown

# 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/`](sdk_usage/).

## Usage Topics

- [Application setup](sdk_usage/application.md): install the SDK, shape an
  extension package, create `ExtensionApp`, include routers, and configure the
  runtime.
- [Event routes](sdk_usage/events.md): register task and non-task event handlers.
- [Authenticated API routes](sdk_usage/api.md): expose authenticated endpoints,
  validate bodies, read request/auth context, return API responses, and use
  pagination.
- [UI plugs](sdk_usage/plugs.md): register `PlugRouter` providers and reference
  static assets.
- [Contexts and pipelines](sdk_usage/contexts-and-pipelines.md): adapt execution
  contexts and compose processing pipelines.
- [Marketplace services](sdk_usage/marketplace-services.md): 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:

```bash
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.
