Skip to main content

mpt-extension-contrib-order-status

Shared order-status pipeline steps for SoftwareONE MPT extensions built on the Extension SDK. The steps switch an order to its next status using a named order template and fall back to the product default when that template is not configured, so status changes stay consistent across extensions.

It replaces the per-extension complete-order and start-processing logic previously re-implemented in the Adobe, AWS, and FinOps extensions.

See AGENTS.md for the module documentation map.

Install

pip install mpt-extension-contrib-order-status

Requires the Extension SDK (mpt-extension-sdk >= 6.3, < 7), which is pulled in as a dependency.

Public API

mpt_extension_contrib.order_status exposes two pipeline steps, one helper, and one enum:

Object Purpose
CompleteOrder(template_name=...) Switch the order to Completed with a named template, falling back to the default.
StartOrderProcessing(template_name=...) Set the Processing template on the first run, falling back to the default.
resolve_template(api_service, *, product_id, status, template_name=None) Resolve a status template by name with default fallback (the primitive both steps use).
OrderStatus StrEnum of the order statuses the library resolves templates for (PROCESSING, COMPLETED).

template_name is optional on both steps; omit it to use the product's default template for the status.

Usage

Add the steps to an order pipeline:

from mpt_extension_sdk.pipeline import BasePipeline, BaseStep

from mpt_extension_contrib.order_status import CompleteOrder, StartOrderProcessing


class PurchasePipeline(BasePipeline):
    @property
    def steps(self) -> list[BaseStep]:
        return [
            StartOrderProcessing(template_name="Purchase processing"),
            # ... order processing steps ...
            CompleteOrder(template_name="Purchase completed"),
        ]
  • StartOrderProcessing(template_name=...) — resolves the Processing template and applies it only when it differs from the one already on the order, so reprocessing is a no-op. When the product has no matching template it logs a warning and continues.
  • CompleteOrder(template_name=...) — resolves the Completed template, completes the order, and refreshes the context order. It is skipped when the order is already completed and stops the pipeline when the product has no completion template at all.

Both steps fall back to the product default template when the requested name is not found, logging that the default was used. Each step also exposes an overridable resolve_template(self, context) method for custom template selection logic. See Usage for the full setup.

Documentation

Metadata

Release files for mpt-extension-contrib-order-status 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mpt-extension-contrib-order-status 1.0.0
File Size Uploaded Provenance Actions
mpt_extension_contrib_order_status-1.0.0.tar.gz 7.7 kB Without provenance Details for mpt_extension_contrib_order_status-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mpt-extension-contrib-order-status 1.0.0
File Interpreter ABI Platform Actions
mpt_extension_contrib_order_status-1.0.0-py3-none-any.whl Python 3 none any Details for mpt_extension_contrib_order_status-1.0.0-py3-none-any.whl

Total release size: 17.3 kB

Release files / mpt_extension_contrib_order_status-1.0.0.tar.gz

Download URL mpt_extension_contrib_order_status-1.0.0.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
becbf3f8b8d35996fd5b9428e60db034dfb1d2e8c434c9b5e599cc9fb4051009
BLAKE2b-256 checksum
How to use checksums
bb8e2bcb212691bf491cc49dbcf11716947d1c26eb21d03015ba3ee34d3dd118
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mpt_extension_contrib_order_status-1.0.0-py3-none-any.whl

Download URL mpt_extension_contrib_order_status-1.0.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b12de6c9eb8d1dd1e3a2e979978d9d99555da097ea1decb16da52bc5af3cc84
BLAKE2b-256 checksum
How to use checksums
05306cbd2eb91e09414e92e6caf36028be85d7e0b7b1ddf3c782617b753a3675
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for mpt-extension-contrib-order-status 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page