LAREX Action SDK
This SDK is work in progress. The public API can still change before LAREX Actions and the SDK are considered stable.
Framework-neutral Python SDK for building LAREX Action processors with signed dispatch verification, typed payloads, and cooperative run cancellation.
The core package verifies LAREX dispatch requests, parses typed run/input payloads, sends heartbeats, downloads selected files, uploads result manifests, and helps processors acknowledge cancellation cleanly. FastAPI support is available as an optional convenience extra.
Installation
uv add "larex-action-sdk[fastapi]"
For framework-neutral usage only:
uv add larex-action-sdk
Quickstart
import os
from larex_actions import ActionContext
from larex_actions.fastapi import create_larex_action_app
async def process(ctx: ActionContext) -> None:
action_input = await ctx.pull_input()
total = len(action_input.pages)
for index, page in enumerate(action_input.pages, start=1):
await ctx.heartbeat(
status_message=f"Processing page {index}/{total}: {page.name}",
raise_on_cancel=True,
)
results = ctx.result_builder()
if page.xml:
xml_bytes = await ctx.download_bytes(page.xml[0])
results.add_xml_bytes(
page_id=page.id,
content=xml_bytes,
file_name=f"{page.name}-processed.xml",
)
await ctx.submit_page_results(page.id, results, f"Finished {page.name}")
await ctx.complete(message="Done")
app = create_larex_action_app(
processor_id="my-processor",
dispatch_secret=os.environ["LAREX_DISPATCH_HMAC_SECRET"],
handler=process,
max_concurrent_runs=1,
)
Documentation
The full guide lives in the LAREX documentation under Processor SDK:
- Quickstart: running a processor, adapter routes, concurrency, and capabilities
- Inputs and Targets: pulled input, targets, input requirements, image types, and dataset items
- Results: result builder, page submissions, image variants, custom files, and run outcomes
- Progress and Cancellation: progress, heartbeats, and cooperative cancellation
- Dynamic Parameter Values: processor-provided parameter allowlists
- Retries and Logging:
RetryPolicyand transport diagnostics - Framework-Neutral Processors:
DispatchVerifier, worker queues, and security
Training, evaluation, and integration processors are described in Dataset Model Training, Dataset Model Evaluation, and Integration Actions.
Development
uv sync --all-extras
uv run ruff format .
uv run ruff check .
uv run pyright
uv run pytest
uv build
Releases are automated by the python-semantic-release workflow. Conventional
commits on main determine the next version (feat → minor, fix/perf →
patch, and breaking changes → major). The workflow verifies the package, updates
pyproject.toml and uv.lock, creates the release commit/tag and GitHub release.
Run it manually from the Actions tab when you need to force a bump level or
create a prerelease.
Configure a repository secret named RELEASE_TOKEN with a GitHub token that has
Contents read/write access. A PAT is required so the generated
tag/release triggers the existing PyPI publication workflow. Release candidate
tags containing rc publish to TestPyPI; published stable releases publish to
PyPI.
Metadata
Release files for larex-action-sdk 0.27.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| larex_action_sdk-0.27.0.tar.gz | 68.8 kB | With provenance | Details for larex_action_sdk-0.27.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| larex_action_sdk-0.27.0-py3-none-any.whl | Python 3 | none | any | Details for larex_action_sdk-0.27.0-py3-none-any.whl |
Total release size: 99.0 kB
Release files / larex_action_sdk-0.27.0.tar.gz
| Download URL | larex_action_sdk-0.27.0.tar.gz |
|---|---|
| Size | 68.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
33fd5f540ad44f0eb612aad6fb1bded76e987d50a6d8026d6bad10723b337809
|
|
BLAKE2b-256 checksum How to use checksums |
d53c58b9888d0f5adbc4d1d35792851acba1fb054541631725ee19cd73d0cbe8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logRelease files / larex_action_sdk-0.27.0-py3-none-any.whl
| Download URL | larex_action_sdk-0.27.0-py3-none-any.whl |
|---|---|
| Size | 30.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
383be6772ede3234539689dcf2f4dec669719500256b27f2edeb0f2da47af63e
|
|
BLAKE2b-256 checksum How to use checksums |
f9bd909341c473c752aa51f1419e6cbb8f10e13cf005f683f04ebe14f86b23f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logSecurity for larex-action-sdk 0.27.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for larex_action_sdk-0.27.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logA 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.