Skip to main content

fluss

PyPI version Maintenance Maintainer PyPI pyversions PyPI download month

The python client for fluss, the Arkitekt workflow service: designing, storing and running workflows (flows) that wire the actions of your apps together.

Installation

pip install fluss

The flow executor is an optional extra, because it needs rekuest while the plain client does not:

pip install "fluss[engine]"   # run flows (fluss.engine)
pip install "fluss[python]"   # also run flows written as Python source

With arkitekt, pip install "arkitekt[rekuest,fluss]" brings it in.

Design

A flow is a graph: argument nodes feed reactive and action nodes, whose outputs reach return nodes. Flows live in workspaces, and every execution of a flow is a run. fluss is the client for that graph — it queries and mutates flows, workspaces and runs on the fluss server — and fluss.engine is what executes one.

Usage

Every fluss operation is a method of the Fluss client, in a blocking and an a-prefixed async flavour (fluss.get_flow(id), await fluss.aget_flow(id)).

In an arkitekt app

Add the service to your app and ask for fluss: Fluss; the client is injected by annotation. Flows and runs travel between actions by id (@fluss/flow, @fluss/run, @fluss/pythonflow, @fluss/pythonrun), so an action can take and return them directly:

from arkitekt import App, run
from fluss import Fluss, fluss_service
from fluss.api.schema import Flow

app = App("flow-inspector", "0.1.0", services=[fluss_service])


@app.action
def describe_flow(flow: Flow, fluss: Fluss) -> str:
    """Describe Flow"""
    return f"{flow.title} in workspace {flow.workspace.id}"


if __name__ == "__main__":
    run(app)

An app built with the fluss service also offers the generic Run Flow action (interface run_flow), so it can execute any flow it is handed (Run Python Flow too, with the python extra).

From a script

from arkitekt import easy
from fluss import fluss_service

with easy("my-script", fluss_service) as fluss:
    for flow in fluss.flows(limit=10):
        print(flow.id, flow.title)

The engine

fluss.engine executes a flow as a generic rekuest action: given a flow and a dict of arguments it yields the flow's returns, so a workflow can be called like any other action.

A flow run is registered as a rekuest workflow: if the agent running it dies, it is resumed, and the node calls that already finished return their recorded results instead of running again. Each call is keyed by its node and how often that node ran, so concurrent branches are found again whichever order they finish in.

from fluss.engine import run_flow, arun_flow

It imports rekuest at module level, so install fluss[engine] to use it. Importing plain fluss never requires rekuest.

Python flows

fluss.engine.python (the python extra) validates and runs flows written as Python source in a Monty sandbox: async def main(...) calls the actions of its manifest by alias.

  • Run Python Flow is a workflow too. Each action call is keyed by the action, a digest of its arguments and how often that exact call was made before, so a resumed run finds its calls again without depending on how its gathered calls interleave. The sandbox's random seed is fixed per run, so the run makes the same calls again. One case remains: identical calls in parallel branches may trade results on resume. The calls downstream of them then run again, which repeats an IRREVERSIBLE action if one is among them.
  • Its actor shares one Monty worker pool across runs. print output reaches the task log while the run goes on. A cancelled run cancels the calls it has in flight and ends CANCELLED.
  • Publishing a version makes it runnable, not an action. To call a version like any action, deploy it onto an agent that hosts run_python_flow:
from fluss.engine.python.client import acreate_python_flow_from_source, adeploy_python_flow, amanifest

actions = await amanifest({"segment": segment_hash}, rekuest)
flow = await acreate_python_flow_from_source(source, actions, fluss, title="Segment", publish=True)
await adeploy_python_flow(flow, rekuest, runner=run_python_flow_implementation_id)

Testing

uv run pytest -m "not integration"   # no server needed
uv run pytest -m integration          # a real fluss server via dokker

See RELEASING.md for how versions are cut.

Metadata

Release files for fluss 6.5.1

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

Source distribution (sdist)

Source distribution for fluss 6.5.1
File Size Uploaded Provenance Actions
fluss-6.5.1.tar.gz 93.3 kB Without provenance Details for fluss-6.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fluss 6.5.1
File Interpreter ABI Platform Actions
fluss-6.5.1-py3-none-any.whl Python 3 none any Details for fluss-6.5.1-py3-none-any.whl

Total release size: 205.6 kB

Release files / fluss-6.5.1.tar.gz

Download URL fluss-6.5.1.tar.gz
Size 93.3 kB
Tags Source
SHA-256 checksum
How to use checksums
edc85556b18eda3fbc5f03e46d4eeeb9b9083ec49de4bbea3cb9ad4167d77a7d
BLAKE2b-256 checksum
How to use checksums
d65aff39ec2e805b3c45939ac1b3d8373dcc1f6a06afc8a968925e3fb317b591
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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 / fluss-6.5.1-py3-none-any.whl

Download URL fluss-6.5.1-py3-none-any.whl
Size 112.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f112334e89f8be8cae2c9bef400f467655b8ced2cab7f36c6d9aa81f19ac401
BLAKE2b-256 checksum
How to use checksums
792dd65b42e69b7375a55b25813ff907cbed4ee8e84a2732f5b35cdfb6a5cde2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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 fluss 6.5.1

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

6.5.1 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