Skip to main content

A High Performance Asynchronous Workflow Scripting Library

Project description

RAF Banner

License: MIT Python 3.8+ Tests Documentation

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.

Currently, RAF supports the following execution backends:

📚 Documentation

👉 AsyncFlow Documentation and API References

Basic Usage

import asyncio

from radical.asyncflow import WorkflowEngine
from radical.asyncflow import ConcurrentExecutionBackend

from concurrent.futures import ThreadPoolExecutor

async def main():
    # Create backend and workflow
    backend = await ConcurrentExecutionBackend(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

radical_asyncflow-0.1.0.tar.gz (42.6 kB view details)

Uploaded Source

Built Distribution

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

radical_asyncflow-0.1.0-py3-none-any.whl (45.5 kB view details)

Uploaded Python 3

File details

Details for the file radical_asyncflow-0.1.0.tar.gz.

File metadata

  • Download URL: radical_asyncflow-0.1.0.tar.gz
  • Upload date:
  • Size: 42.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for radical_asyncflow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 45283b0df58c3ada754711264c3b4aacdaadc56b46f2bf6b172bbee0fcf3ab0f
MD5 dd2fc45f5a4e082284f23d31e8bedfa0
BLAKE2b-256 18ea0ade2cd469c277de18930760fa9a16060c65abad4fd96dfb2daa135a4057

See more details on using hashes here.

File details

Details for the file radical_asyncflow-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for radical_asyncflow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 076348089019b94043bec644f689b3fb76d87f268583265ee46d4cbfaef89f9b
MD5 c9612955acc8392bdb24b0880b352551
BLAKE2b-256 c3570ed52b930af2b4bd85a2c52c33474f32d6309202b012b58126995236f413

See more details on using hashes here.

Supported by

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