Coflux Python SDK
Project description
Coflux Python SDK
The Coflux Python SDK provides decorators and utilities for defining workflows and tasks.
Installation
pip install coflux
Or for development:
cd adapters/python
poetry install
Usage
Defining Tasks and Workflows
from coflux import task, workflow, log_info
@task()
def process_item(item_id: int) -> dict:
log_info("Processing item {id}", id=item_id)
return {"id": item_id, "status": "done"}
@workflow()
def batch_process(items: list[int]) -> list[dict]:
results = []
for item_id in items:
result = process_item(item_id)
results.append(result)
return results
CLI Commands
The SDK is invoked by the Go CLI via subprocess:
# Discovery - find all @task/@workflow targets
python -m coflux discover myapp.workflows myapp.tasks
# Execution - run as executor process
python -m coflux execute
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coflux-0.10.0.tar.gz.
File metadata
- Download URL: coflux-0.10.0.tar.gz
- Upload date:
- Size: 22.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f83eb6d95a192386334198aac1d1c8915e909ed44e79e99c82e200d3f20ccb4
|
|
| MD5 |
1d49e50f6318cebc53b6afd64b9b90e2
|
|
| BLAKE2b-256 |
1e3c47b7a7285afbb4ba42dee58b90bf123bc843005e235330ad51f6a40e0a20
|
Provenance
The following attestation bundles were made for coflux-0.10.0.tar.gz:
Publisher:
release.yml on bitroot/coflux
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coflux-0.10.0.tar.gz -
Subject digest:
4f83eb6d95a192386334198aac1d1c8915e909ed44e79e99c82e200d3f20ccb4 - Sigstore transparency entry: 1280929493
- Sigstore integration time:
-
Permalink:
bitroot/coflux@84c2d78ae86aec66691806c6adfef3505abed0ca -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bitroot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@84c2d78ae86aec66691806c6adfef3505abed0ca -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file coflux-0.10.0-py3-none-any.whl.
File metadata
- Download URL: coflux-0.10.0-py3-none-any.whl
- Upload date:
- Size: 28.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37723f9f2886e549d9f6caafdac188a01bfb0e4eb97fa2e7e04866b2dc344ed4
|
|
| MD5 |
0bb16ac60d704246701af9c32373de02
|
|
| BLAKE2b-256 |
4d0196a810d51e747e4ddd925ca100fdf995803d503f6c793f08331447fa85c1
|
Provenance
The following attestation bundles were made for coflux-0.10.0-py3-none-any.whl:
Publisher:
release.yml on bitroot/coflux
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coflux-0.10.0-py3-none-any.whl -
Subject digest:
37723f9f2886e549d9f6caafdac188a01bfb0e4eb97fa2e7e04866b2dc344ed4 - Sigstore transparency entry: 1280929496
- Sigstore integration time:
-
Permalink:
bitroot/coflux@84c2d78ae86aec66691806c6adfef3505abed0ca -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bitroot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@84c2d78ae86aec66691806c6adfef3505abed0ca -
Trigger Event:
workflow_dispatch
-
Statement type: