Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coflux-0.11.1.tar.gz (30.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coflux-0.11.1-py3-none-any.whl (36.6 kB view details)

Uploaded Python 3

File details

Details for the file coflux-0.11.1.tar.gz.

File metadata

  • Download URL: coflux-0.11.1.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for coflux-0.11.1.tar.gz
Algorithm Hash digest
SHA256 b738f1f53b2047623733e785f5d47cdc387a9252144e4cbda77ba5c57c28a18b
MD5 41a3d7424570e80fcfcee7bcb26f9175
BLAKE2b-256 195ce0a47fab228b8b63f64402a34225a188d303eaeaad386ce352680c051c4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for coflux-0.11.1.tar.gz:

Publisher: release.yml on bitroot/coflux

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file coflux-0.11.1-py3-none-any.whl.

File metadata

  • Download URL: coflux-0.11.1-py3-none-any.whl
  • Upload date:
  • Size: 36.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for coflux-0.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9d5c15b12a2b3051e2051d7da01583ebe77b9465ca12ae02b47ff13eee1ff2a
MD5 d276b31b30a34f8ef1731d327b37cb3e
BLAKE2b-256 b22707a0e034e5c97ee46029de58b6a183e277865088983edd657622b7b6b421

See more details on using hashes here.

Provenance

The following attestation bundles were made for coflux-0.11.1-py3-none-any.whl:

Publisher: release.yml on bitroot/coflux

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.11.1 This release

2 files

0.11.0

2 files

0.10.0

2 files

0.9.1

2 files

0.9.0

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page