prefect-ray
Prefect integrations with the Ray execution framework.
What it is and what it does
prefect-ray is an integration layer that connects Prefect's workflow orchestration engine to Ray, a distributed computing framework. It allows Prefect workflows to execute tasks in parallel across Ray clusters, enabling horizontal scaling of compute-intensive workloads. The package depends on both prefect and ray as runtime dependencies, meaning you need both libraries installed and configured to use it effectively.
Typically used when you have Prefect workflows that need to run tasks in parallel on multiple machines or cores, or when you want to leverage Ray's distributed computing capabilities within a Prefect-orchestrated pipeline. The integration handles the bridge between Prefect's task model and Ray's execution model.
Use it for:
- Run CPU-intensive Prefect tasks in parallel across a Ray cluster to reduce total workflow execution time.
- Scale machine learning training or batch inference jobs orchestrated by Prefect to multiple nodes via Ray.
- Execute data processing pipelines with Prefect while distributing compute across Ray workers.
- Coordinate multi-stage workflows in Prefect where individual stages benefit from Ray's parallel execution.
- Integrate Ray's fault tolerance with Prefect's workflow scheduling and monitoring capabilities.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates Ray distributed computing with Prefect workflow orchestration to enable parallel task execution across Ray clusters.
Yes, if you are already using Prefect and need distributed task execution. The package is actively maintained, has low install friction, carries no licensing restrictions, and supports Python 3.10, 3.11, and 3.12. Install it when you have Prefect workflows that would benefit from Ray's parallel execution and you have Ray infrastructure available.
Install
prefect-ray on PyPI
pip
pip install prefect-rayuv
uv add prefect-raypoetry
poetry add prefect-rayInstalling prefect-ray
Before you install
Low friction installation with a pure Python wheel. Actively maintained with recent releases. Requires Python 3.10 or later but excludes Python 3.13.
License in practice
Apache License 2.0 is permissive and poses no restrictions on commercial or private use, modification, or redistribution.
Quickstart
pip install prefect-ray
from prefect import flow, task
from prefect_ray import RayTaskRunner
@flow
def my_workflow():
pass
my_workflow(task_runner=RayTaskRunner())
Requires Ray cluster to be running and accessible; Python 3.10 or later (not 3.13).
Verify before relying
- Whether Ray cluster setup and configuration is documented within the package or requires external Ray knowledge.
- What specific Prefect workflow patterns or task types benefit most from Ray execution versus other executors.
- How the integration handles Ray cluster lifecycle management and fault recovery.
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | capped below the current Python release (!=3.13,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — prefect, ray |
| Maintenance | actively maintained — 90 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 143,073/month — #11,184 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: prefect_ray-0.5.0-py3-none-any.whl
Keywords: prefect
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
prefect-daskIntegrates Prefect workflow orchestration with…
permissive · top 15,000 on PyPI
prefect-dockerProvides Docker task execution and container…
permissive · top 5,000 on PyPI
prefect-redisIntegrates Prefect workflow orchestration with…
permissive · top 15,000 on PyPI
rayRay is a distributed computing framework that…
permissive · top 1,000 on PyPI
prefect-gcpIntegrates Prefect workflow orchestration with…
permissive · top 5,000 on PyPI
prefect-clientA lightweight client library for interacting…
permissive · top 15,000 on PyPI
prefect-dbtPrefect integration that orchestrates dbt…
permissive · top 15,000 on PyPI
prefectPrefect is a Python workflow orchestration…
permissive · top 5,000 on PyPI
prefect-sqlalchemyIntegrates SQLAlchemy with Prefect workflows,…
permissive · top 5,000 on PyPI
prefect-shellProvides Prefect workflow tasks for executing…
permissive · top 15,000 on PyPI