A High Performance Asynchronous Workflow Scripting Library
Project description
RADICAL AsyncFlow (RAF) is a fast asynchronous scripting library built on top of asyncio for building powerful async/sync workflows on HPC, clusters, and local machines. It supports pluggable execution backends with intuitive task dependencies and workflow composition.
-
⚡ Powerful asynchronous workflows — Compose complex async and sync workflows easily, with intuitive task dependencies and campaign orchestration.
-
🌐 Portable across environments — Run seamlessly on HPC systems, clusters, and local machines with pluggable execution backends.
-
🧩 Flexible and extensible — Supports campaign management and advanced workflow patterns, built on Python’s asyncio and RADICAL Cybertools expertise.
AsyncFlow ships with the following built-in execution backends:
LocalExecutionBackend— local execution using Python's concurrent.futures (ThreadPoolExecutor / ProcessPoolExecutor)NoopExecutionBackend— no-op backend for testing anddry_runmode
For HPC execution, install RHAPSODY which provides additional backends that plug directly into AsyncFlow:
- Radical.Pilot — distributed HPC execution across supercomputers and clusters
- Dask — parallel computing with Dask distributed
- Concurrent — thread/process pool execution with extended HPC support
- Dragon — high-performance distributed execution
⚙️ Installation
Radical AsyncFlow package is available on PyPI.
pip install radical-asyncflow
For HPC execution via RHAPSODY:
pip install rhapsody-py
For developers:
git clone https://github.com/radical-cybertools/radical.asyncflow
cd radical.asyncflow
pip install -e .[dev,lint,doc]
📚 Documentation
👉 AsyncFlow Documentation and API References
Basic Usage
import asyncio
from radical.asyncflow import WorkflowEngine, LocalExecutionBackend
from concurrent.futures import ThreadPoolExecutor
async def main():
# Create backend and workflow
backend = await LocalExecutionBackend(ThreadPoolExecutor())
flow = await WorkflowEngine.create(backend=backend)
@flow.executable_task
async def task1():
return "/bin/echo 5"
@flow.function_task
async def task2(t1_result):
return int(t1_result.strip()) * 2 * 2
# create the workflow
t1_fut = task1()
t2_result = await task2(t1_fut) # t2 depends on t1 (waits for it)
print(t2_result)
# shutdown the execution backend
await flow.shutdown()
if __name__ == "__main__":
asyncio.run(main())
What AsyncFlow Can Be Used For
- AI & LLM Workflows - Build complex AI agent systems and orchestrate multiple language model calls with automatic dependency resolution in parallel.
- Data Processing Pipelines - Create data science pipelines, and real-time analytics with async task coordination.
- High-Performance Computing - Execute scientific computing workflows and distributed simulations on HPC clusters with scaling.
- Cross-Platform Execution - Deploy the same workflows locally for development, or HPC infrastructure without code changes
Project details
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 radical_asyncflow-0.3.0.tar.gz.
File metadata
- Download URL: radical_asyncflow-0.3.0.tar.gz
- Upload date:
- Size: 32.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a7c2d9d4138b5b3c487981805158a7e23dd5573693cd9778de42bdae5dddc22
|
|
| MD5 |
9757a217521e0169ede3ea5b1943d6ec
|
|
| BLAKE2b-256 |
3af50fcd31e91d02f5cfb1e6437e237926de51e1b086155ac498f927d5172a95
|
File details
Details for the file radical_asyncflow-0.3.0-py3-none-any.whl.
File metadata
- Download URL: radical_asyncflow-0.3.0-py3-none-any.whl
- Upload date:
- Size: 30.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b530cf74ee94fd2269b5f503614d1c605ee2c99614fe20a36106d360edf0fa6
|
|
| MD5 |
9f81c6620ff6c3c3b577eab8710eead7
|
|
| BLAKE2b-256 |
529007e4bb21435df5d1d5a150dda2694b08e82f60b13f294b2b79657d252489
|