Modern Workflow Orchestration
Prefect is the modern Airflow replacement for building,
observing, and reacting to your workflows.
Take a Tour of How Prefect Visualizes Python Workflows
No DAG Required
Dynamic workflows
Prefect discovers your workflows at runtime so you can write the code you want, without conforming to a constrictive domain-specific language.
main.py
1from prefect import flow, task
2
3@task
4def add_one(x: int):
5 return x + 1
6
7@flow
8def main():
9 for x in [1, 2, 3]:
10 first = add_one(x)
11 second = add_one(first)
Enterprise Grade
Full-featured
- Scheduling, retries, native secrets
- Scaling and concurrency
- Flexible infrastructure and storage configuration
- Logging
- Intuitive UI and dashboard
Apache v2.0 License
Open-source flexibility
Host your own open-source Prefect server, or take advantage of high availability, security, advanced features, and better performance with Prefect Cloud.
prefect server start
Lightweight
Spin up your own orchestration server for development with one command.
This makes local development a breeze, with seamless deployment to production.
$ prefect server start
___ ___ ___ ___ ___ ___ _____
| _ \ _ \ __| __| __/ __|_ _|
| _/ / _|| _|| _| (__ | |
|_| |_|_\___|_| |___\___| |_|
Configure Prefect to communicate with the server with:
prefect config set PREFECT_API_URL=http://127.0.0.1:4200/api
View the API reference documentation at http://127.0.0.1:4200/docs
Check out the dashboard at http://127.0.0.1:4200
Code as workflows
Pure Python
Start orchestrating with a single decorator, and take your workflow to production without building unnecessary abstractions.
1from prefect import flow
2
3@flow
4def my_favorite_function():
5 print("What is your favorite number?")
6 return 42
7
8print(my_favorite_function())
$ python hello_prefect.py
15:27:42.543 | INFO | prefect.engine - Created flow run
for flow 'my-favorite-function'
What is your favorite number?
15:27:42.652 | INFO | Finished in state Completed()
42