This release is a pre-release and may not be stable for production use.
Luma Flow Python SDK
Connect Python services to a self-hosted Luma Flow instance. The first alpha
supports Python 3.11 and later and uses only the Python standard library at runtime.
It requires a Luma Flow server with the /api/work/v1 business API and Webhook
support. The SDK uses published workflow versions.
Install from source
From the Luma Flow repository root:
python3 -m pip install ./sdk/python
Submit and read a task
Use a personal access token from the server. Set LUMAFLOW_URL to its base URL
and supply LUMAFLOW_TOKEN from your credential store. Use HTTPS for remote
services. Use stable IDs and event keys in integrations that run unattended.
import os
from lumaflow import LumaFlowClient
client = LumaFlowClient(os.environ["LUMAFLOW_URL"], os.environ["LUMAFLOW_TOKEN"])
spaces = client.list_spaces()
apps = client.list_apps(spaces[0]["id"])
workflows = client.list_workflows(apps[0]["id"])
# Example for the supplier review workflow. Use your workflow's fields.
run = client.start_run(
apps[0]["id"],
workflows[0]["id"],
{"supplier": "Example A", "summary": "New supplier", "kind": "已补齐"},
idempotency_key="supplier-request-001",
)
result = client.get_run(run["id"])
print(result["status"])
for artifact in result["evidence"]:
data = client.get_evidence(run["id"], artifact["id"], attempt=artifact["attempt"])
print(artifact["name"], data)
The task may still be queued, running, or awaiting approval when queried.
The example assumes that the first workspace, workbench and workflow are the
supplier review example. Inspect fields to obtain the exact keys and options
for your workflow. A text attachment uses {"name": "proof.txt", "text": "..."}.
Trigger a Webhook
Use the full endpoint and dedicated key from the trigger's configuration. The Webhook returns a run ID. Query it with a personal token for an account with access to the run.
import os
from lumaflow import trigger_webhook
run_id = trigger_webhook(
os.environ["LUMAFLOW_WEBHOOK_URL"],
os.environ["LUMAFLOW_WEBHOOK_TOKEN"],
{"supplier": "Example A", "summary": "New supplier", "kind": "已补齐"},
idempotency_key="supplier-event-001",
)
Use the same ASCII idempotency key and input if you retry the same submission.
A conflicting reuse of a key can return HTTP 409. The SDK does not retry or
follow redirects. APIError.status_code carries the server's HTTP status.
TransportError means the exchange failed and submission may already have been
accepted. ProtocolError signals an unexpected success response. The default
timeout is 30 seconds and can be set with timeout=.
Metadata
Release files for lumaflow-sdk 0.1.0a1
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 |
|---|---|---|---|---|
| lumaflow_sdk-0.1.0a1.tar.gz | 7.2 kB | With provenance | Details for lumaflow_sdk-0.1.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lumaflow_sdk-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details for lumaflow_sdk-0.1.0a1-py3-none-any.whl |
Total release size: 13.8 kB
Release files / lumaflow_sdk-0.1.0a1.tar.gz
| Download URL | lumaflow_sdk-0.1.0a1.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db2a71b01e5bcb607e3ac1437a1d19b9911e9a37d3755e8c3cc3d2a422e81261
|
|
BLAKE2b-256 checksum How to use checksums |
cf17680a66daf6d11ee2615cf88ea0e775a9a26d6577d86627767e2cafce28a3
|
| 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 Dec 1, 2026.
Transparency logRelease files / lumaflow_sdk-0.1.0a1-py3-none-any.whl
| Download URL | lumaflow_sdk-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af2737dfce13b6c36f326ed4e1c3e71c6e4341eaf9a3b45f90ceff6a2cb15494
|
|
BLAKE2b-256 checksum How to use checksums |
6ab4d48301ae6b7e1756cf73f16dfd6522972dd7757f176dd10cb60ddee2cf7e
|
| 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 Dec 1, 2026.
Transparency logSecurity for lumaflow-sdk 0.1.0a1
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 lumaflow_sdk-0.1.0a1.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 Dec 1, 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.