Step 1
Add the @flow decorator to any Python function. No YAML, no complex DSLs—just Python. Your code remains readable and testable while gaining orchestration capabilities.
View quickstart guideStep 2
Deploy workflows from your own infrastructure using the Prefect CLI. You control where code lives and how it runs. Workers execute in your environment with full access to your resources.
Prefect Cloud's hybrid architecture means your code and data never leave your infrastructure. Workers poll Prefect for scheduled runs, then execute workflows locally with direct access to your databases and services.
No inbound connections
Your firewall rules stay locked down
Data stays local
Direct access to your databases
Metadata only
Logs and state, never your data
Step 3
When it's time to run, workers in your infrastructure gather code, prepare resources, and execute flows. All execution happens locally—Prefect receives only logs and state updates for observability.
Step 4
Decompose complex workflows into independently tracked tasks using the @task decorator. Get granular observability and retry logic for each step without exposing your data—only execution metadata reaches Prefect.
Try Prefect Cloud freeStep 5
Prefect manages flow run states and directs automatic retries on failure. Your workflows become resilient without custom error handling. State transitions and logs flow to Prefect—your actual data remains in your infrastructure.
Start with Prefect Cloud's free tier or install self-hosted—both give you the same Python-first experience with your code and data staying exactly where you need them.