# prefect

> Workflow orchestration and management.

- **URL**: https://www.freshcrate.ai/projects/prefect
- **Author**: pypi
- **Category**: Frameworks
- **Latest version**: `3.7.3` (2026-06-01)
- **License**: Apache-2.0
- **Source**: https://github.com/PrefectHQ/prefect/releases
- **Homepage**: https://pypi.org/project/prefect/
- **Language**: Python
- **GitHub**: 22,213 stars, 2,272 forks
- **Registry**: pypi (`prefect`)
- **Tags**: `pypi`

## Description

<p align="center"><img src="https://github.com/PrefectHQ/prefect/assets/3407835/c654cbc6-63e8-4ada-a92a-efd2f8f24b85" width=1000></p>

<p align="center">
    <a href="https://pypi.org/project/prefect/" alt="PyPI version">
        <img alt="PyPI" src="https://img.shields.io/pypi/v/prefect?color=0052FF&labelColor=090422" />
    </a>
    <a href="https://pypi.org/project/prefect/" alt="PyPI downloads/month">
        <img alt="Downloads" src="https://img.shields.io/pypi/dm/prefect?color=0052FF&labelColor=090422" />
    </a>
    <a href="https://github.com/prefecthq/prefect/" alt="Stars">
        <img src="https://img.shields.io/github/stars/prefecthq/prefect?color=0052FF&labelColor=090422" />
    </a>
    <a href="https://github.com/prefecthq/prefect/pulse" alt="Activity">
        <img src="https://img.shields.io/github/commit-activity/m/prefecthq/prefect?color=0052FF&labelColor=090422" />
    </a>
    <br>
    <a href="https://prefect.io/slack" alt="Slack">
        <img src="https://img.shields.io/badge/slack-join_community-red.svg?color=0052FF&labelColor=090422&logo=slack" />
    </a>
    <a href="https://www.youtube.com/c/PrefectIO/" alt="YouTube">
        <img src="https://img.shields.io/badge/youtube-watch_videos-red.svg?color=0052FF&labelColor=090422&logo=youtube" />
    </a>
</p>


<p align="center">
    <a href="https://docs.prefect.io/v3/get-started/index?utm_source=oss&utm_medium=oss&utm_campaign=oss_gh_repo&utm_term=none&utm_content=none">
        Installation
    </a>
    ·
    <a href="https://docs.prefect.io/v3/get-started/quickstart?utm_source=oss&utm_medium=oss&utm_campaign=oss_gh_repo&utm_term=none&utm_content=none">
        Quickstart
    </a>
    ·
    <a href="https://docs.prefect.io/v3/how-to-guides/workflows/write-and-run?utm_source=oss&utm_medium=oss&utm_campaign=oss_gh_repo&utm_term=none&utm_content=none">
        Build workflows
    </a>
    ·
    <a href="https://docs.prefect.io/v3/concepts/deployments?utm_source=oss&utm_medium=oss&utm_campaign=oss_gh_repo&utm_term=none&utm_content=none">
        Deploy workflows
    </a>
    ·
    <a href="https://app.prefect.cloud/?utm_source=oss&utm_medium=oss&utm_campaign=oss_gh_repo&utm_term=none&utm_content=none">
        Prefect Cloud
    </a>
</p>

# Prefect

Prefect is a workflow orchestration framework for building data pipelines in Python.
It's the simplest way to elevate a script into a production workflow.
With Prefect, you can build resilient, dynamic data pipelines that react to the world around them and recover from unexpected changes.

With just a few lines of code, data teams can confidently automate any data process with features such as scheduling, caching, retries, and event-based automations.

Workflow activity is tracked and can be monitored with a self-hosted [Prefect server](https://docs.prefect.io/latest/manage/self-host/?utm_source=oss&utm_medium=oss&utm_campaign=oss_gh_repo&utm_term=none&utm_content=none) instance or managed [Prefect Cloud](https://www.prefect.io/cloud-vs-oss?utm_source=oss&utm_medium=oss&utm_campaign=oss_gh_repo&utm_term=none&utm_content=none) dashboard.

> [!TIP]
> Prefect flows can handle retries, dependencies, and even complex branching logic
> 
> [Check our docs](https://docs.prefect.io/v3/get-started/index?utm_source=oss&utm_medium=oss&utm_campaign=oss_gh_repo&utm_term=none&utm_content=none) or see the example below to learn more!

## Getting started

Prefect requires Python 3.10+. To [install the latest version of Prefect](https://docs.prefect.io/v3/get-started/install), run one of the following commands:

```bash
pip install -U prefect
```

```bash
uv add prefect
```

Then create and run a Python file that uses Prefect `flow` and `task` decorators to orchestrate and observe your workflow - in this case, a simple script that fetches the number of GitHub stars from a repository:

```python
from prefect import flow, task
import httpx


@task(log_prints=True)
def get_stars(repo: str):
    url = f"https://api.github.com/repos/{repo}"
    count = httpx.get(url).json()["stargazers_count"]
    print(f"{repo} has {count} stars!")


@flow(name="GitHub Stars")
def github_stars(repos: list[str]):
    for repo in repos:
        get_stars(repo)


# run the flow!
if __name__ == "__main__":
    github_stars(["PrefectHQ/prefect"])
```

Fire up a Prefect server and open the UI at http://localhost:4200 to see what happened:

```bash
prefect server start
```

To run your workflow on a schedule, turn it into a deployment and schedule it to run every minute by changing the last line of your script to the following:

```python
if __name__ == "__main__":
    github_stars.serve(
        name="first-deployment",
        cron="* * * * *",
        parameters={"repos": ["PrefectHQ/prefect"]}
    )
```

You now have a process running locally that is looking for scheduled deployments!
Additionally you can run your workflow manually from the UI or CLI. You can even run deployments in response to [events](https://docs.prefect.io/lat

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `3.7.3` | 2026-06-01 | High | Automatic dependency installation for pulled-code deployments is now opt-in. In 3.7.2, the runner would automatically prepare project dependencies when a deployment pulled code containing a `pyproject.toml`. This behavior is now disabled by default. Set `PREFECT_RUNNER_AUTO_INSTALL_DEPENDENCIES=true` (or `runner.auto_install_dependencies = true` in your profile) to re-enable it.  **Enhancements ➕➕**  * Expose WebSocket ping interval/timeout settings for uvicorn by [@chuqCTC](https://github.com/c |
| `3.7.2` | 2026-05-23 | High | **Enhancements ➕➕**  * Add delete flow run automation action by [@zzstoatzz](https://github.com/zzstoatzz) in [#22018](https://github.com/PrefectHQ/prefect/pull/22018) * Add worker channel handshake and heartbeat by [@desertaxle](https://github.com/desertaxle) in [#22004](https://github.com/PrefectHQ/prefect/pull/22004) * Add work-pool snapshot delivery to worker channel by [@desertaxle](https://github.com/desertaxle) in [#22026](https://github.com/PrefectHQ/prefect/pull/22026) * Index triggers |
| `3.7.1` | 2026-05-16 | High | **Enhancements ➕➕**  * Add `deployment_name` logging variable by [@devin-ai-integration](https://github.com/devin-ai-integration)[bot] in [#21804](https://github.com/PrefectHQ/prefect/pull/21804) * Infer logs page size from API response in CLI by [@alighazi288](https://github.com/alighazi288) in [#21711](https://github.com/PrefectHQ/prefect/pull/21711) * Add default result storage CLI by [@zzstoatzz](https://github.com/zzstoatzz) in [#21771](https://github.com/PrefectHQ/prefect/pull/21771) |
| `3.7.0` | 2026-05-06 | High | Prefect 3.7.0 promotes [infrastructure decorators](https://docs.prefect.io/v3/advanced/submit-flows-directly-to-dynamic-infrastructure) and the [plugin system](https://docs.prefect.io/v3/advanced/plugins) to GA. Infrastructure decorators are now ready for defining reusable run infrastructure directly in Python, and plugins now live in first-class settings with backward-compatible support for existing experimental configuration. Turns out they were just going through a phase.  **New Features 🎉 |
| `3.6.29` | 2026-05-01 | High | **Enhancements ➕➕**  * Replace correlated `EXISTS` with `JOIN` fast-path in `count_flow_runs` by [@VittoriaLanzo](https://github.com/VittoriaLanzo) in [#21707](https://github.com/PrefectHQ/prefect/pull/21707) * Sort `TaskRunRecorder` bulk upsert batches by `task_run.id` to prevent deadlocks by [@chuqCTC](https://github.com/chuqCTC) in [#21717](https://github.com/PrefectHQ/prefect/pull/21717)  **Bug Fixes 🐞**  * Clear `BlockStorageAdapter` destination before each pull by [@devin-ai-integration]( |
| `3.6.28` | 2026-04-24 | High | 🎵 And stops my mind from wandering 🎵   **Enhancements ➕➕**  * Refactor `whenever` API compat helpers and fix `in_local_tz` for naive datetimes by [@vyagubov](https://github.com/vyagubov) in [#21640](https://github.com/PrefectHQ/prefect/pull/21640) * Handle unknown serializers during dispatch by [@harsh21234i](https://github.com/harsh21234i) in [#21644](https://github.com/PrefectHQ/prefect/pull/21644)  **Bug Fixes 🐞**  * Skip `uv pip freeze` in bundle creation when a non-uv launcher i |
| `3.6.27` | 2026-04-21 | Low | Imported from PyPI (3.6.27) |
| `3.6.28.dev3` | 2026-04-21 | High | <!-- Release notes generated using configuration in .github/release.yml at main -->  ## What's Changed ### Bug Fixes 🐞 * Don't overwrite custom_headers Authorization with PREFECT_API_KEY in check_server_version by @vyagubov in https://github.com/PrefectHQ/prefect/pull/21621 ### Uncategorized * Document uv run --project for local integrations by @zzstoatzz in https://github.com/PrefectHQ/prefect/pull/21625 * docs: document useQuery exception for silently-hiding components in ui-v2 AGENTS.md by @ |
| `3.6.28.dev2` | 2026-04-21 | High | <!-- Release notes generated using configuration in .github/release.yml at main -->  ## What's Changed ### Bug Fixes 🐞 * Skip `uv pip freeze` in bundle creation when a non-uv launcher is set by @devin-ai-integration[bot] in https://github.com/PrefectHQ/prefect/pull/21607 * Fix DNS rebinding TOCTOU bypass in `validate_restricted_url` by @devin-ai-integration[bot] in https://github.com/PrefectHQ/prefect/pull/21591 ### Development & Tidiness 🧹 * fix(tests): prevent aiosqlite teardown race in lega |
| `3.6.28.dev1` | 2026-04-20 | High | <!-- Release notes generated using configuration in .github/release.yml at main -->  ## What's Changed ### Bug Fixes 🐞 * fix(prefect-shell): kill whole process tree on ShellOperation cleanup by @zzstoatzz in https://github.com/PrefectHQ/prefect/pull/21586 ### Uncategorized * docs: document SIGTERM bridge and sanitize_subprocess_env in utilities AGENTS.md by @github-actions[bot] in https://github.com/PrefectHQ/prefect/pull/21604 * docs: document JSDOM CSS custom property and matchMedia mocking p |

## Citation

- HTML: https://www.freshcrate.ai/projects/prefect
- Markdown: https://www.freshcrate.ai/projects/prefect.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/prefect/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
