PROVIDER - Python Workflow Orchestration

Prefect

Prefect turns plain Python functions into flows and tasks with decorators, leaving scheduling, retries and observability to the platform; Apache-2.0 core self-hosts, and Prefect Cloud starts free with a team tier at $100 per seat monthly.

Automation United States 2026.11.30 1 views
4.2pts
Advertisement

Service Overview

Prefect is a workflow orchestration platform built for Python. Adding flow and task decorators to functions produces schedulable units with state, retries, logs and concurrency control, so existing scripts do not need rewriting into DAG configuration first. It targets analytics, scraping, ETL and internal batch teams whose code already works locally and lacks scheduling, failure handling and run records.

The core is Apache-2.0 and can be self-hosted. Prefect Cloud has four tiers: free Hobby, Starter, Team and Enterprise, with Hobby including two users and five deployments. Execution is described by work pools, which point at local processes, Docker, Kubernetes or platform-provided serverless capacity.

Key Strengths

  • Decorators turn existing Python functions into flows and tasks, so migration changes a few lines, not the architecture.
  • Work pools abstract the compute layer, letting one flow run on local processes, containers or a Kubernetes cluster.
  • State, logs and retry history persist per run, and failed steps rerun on their own within the retention window.
  • Blocks store credentials and connection settings centrally, and code references block names instead of secrets.
  • The Apache-2.0 core self-hosts without caps on flows or runs, leaving only infrastructure cost.

Limitations

  • Hobby allows two users, five deployments and seven days of run history, so production usually needs a paid tier.
  • Team bills $100 per user per month, which grows quickly with headcount and does not map to concurrency.
  • Self-hosting means operating the API, the database and worker processes; serverless capacity is cloud-only.
  • There is no enforced dependency graph, so cross-flow dependencies rely on triggers or external coordination.
  • A mismatched work pool leaves runs queued with no worker to pick them up, which needs queue-level debugging.

Product Ecosystem

From function to run: deployments schedule, work pools execute @flow function orchestration and concurrency Deployment schedule, parameters and version Work pool process, Docker or Kubernetes @task substeps: independent retries, caching and concurrency limits; a failure stays local Run records state, logs, duration and retries Blocks central storage for credentials Automations react to events with alerts or runs Deployments are separate from work pools: changing compute does not touch business code (scope: official docs, 2026-11)
Figure 1: Flow, deployment and work pool chain (scope: official documentation, 2026-11)

Prefect separates code from execution: flows and tasks describe logic, deployments declare schedules and parameters, and work pools declare compute. With the three decoupled, moving between environments does not require code changes.

Flows, tasks and state

A flow is the orchestration entry point and tasks are independently retried substeps. Tasks carry caching and concurrency limits by default, and states move from scheduled to completed with a full transition record. Retries use exponential backoff declared on the decorator.

Deployments and schedules

A deployment pairs a runnable with a schedule, declared in prefect.yaml or created in code with .serve() and .deploy(). Schedules support cron, intervals and event triggers, run parameters override at deployment level, and code upgrades require redeploying to refresh the version snapshot.

Work pools and workers

Work pools come as process, Docker, Kubernetes and serverless push types, and a worker polls its pool for queued runs. Self-hosted teams run workers on their own machines or clusters, while cloud plans can use serverless capacity metered in minutes.

Blocks and automations

Blocks hold credentials, connection strings and notification settings, referenced by name and encrypted by the platform. Automations react to flow state events, such as alerting on failure or starting a downstream flow, so alerting logic is not duplicated in every flow.

Observability and troubleshooting

Each run records a state timeline, logs and retry counts, filterable by deployment or tag. Runs that queue without starting usually mean no worker is available for the pool; the callback debugging approach in webhook signature verification helps isolate whether the problem sits at the trigger or the worker.

Use Cases

  • Good fit|Teams with many Python scripts: decorators add scheduling while credentials move into blocks.
  • Good fit|Analytics and scraping batches: task-level retries and run records cover most failure modes.
  • Good fit|Compute that must move between hosts: the same flow runs on local, container or cluster workers.
  • Good fit|Teams that keep data in-house: self-hosted API and database can stay inside the intranet.
  • Evaluate|Business teams needing drag-and-drop: the editor is Python-first with limited canvas work.
  • Evaluate|Collaboration beyond eight people: the Team tier caps seats, larger setups need a contract.
  • Evaluate|Complex cross-flow topologies: dependencies rely on triggers or external coordination.

Pricing & Billing Selection

Free tier caps users and deployments; paid tiers add seats and quota Hobby · free 2 users 5 deployments 500 serverless minutes 7-day run retention logging and alerts Starter · USD 100/mo 3 users 20 deployments 75 serverless hours bring your own compute webhooks, 1,250 API calls/min Team · USD 100/user 4 to 8 users 100 deployments 225 serverless hours service accounts 24-hour audit log Enterprise unlimited deployments SAML and OIDC SSO RBAC, private networking multiple workspaces IP allowlist and PrivateLink Open source: Apache-2.0, self-hosted with no user or deployment cap; serverless capacity is cloud only (scope: prefect.io/pricing, USD, 2026-11; serverless allowance is metered in minutes)
Figure 2: Four tiers and included quotas (scope: prefect.io/pricing, USD, 2026-11)

The four cloud tiers differ in users, deployments, serverless allowance and governance; prices are fixed per tier, with Team charged per seat.

Plan Reference price Included quota Key capabilities
Hobby free 2 users, 5 deployments, 500 serverless minutes, 7-day run retention flow scheduling, logging and alerts, base observability
Starter $100/month 3 users, 20 deployments, 75 serverless hours, 1,250 API calls per minute bring your own compute, webhook triggers
Team $100 per user per month 4 to 8 users, 100 deployments, 225 serverless hours service accounts, 24-hour audit log
Enterprise annual contract unlimited deployments; workspaces and seats per contract SAML and OIDC SSO, RBAC and access control, multiple workspaces, SCIM sync, IP allowlist and PrivateLink
Open-source self-hosted free software unlimited users, deployments and runs; you fund the API, database and workers Apache-2.0 licence, the same decorators and deployment code as cloud

Serverless allowance is metered in minutes and suits low-frequency or bursty work; steady high-frequency jobs fit better on workers in your own infrastructure, with the cloud handling orchestration and observability.

FAQ

  • How much do existing scripts change? Add a flow decorator to the entry function and task decorators to substeps; signatures and return values stay the same. Credentials move into blocks, scheduling and parameters go into the deployment, and execution becomes an observable deployment run instead of a manual invocation.
  • What happens if the work pool is wrong? Runs sit in a pending state without an error, because no worker picks them up. Check the work pool named by the deployment, whether any worker in that pool is online, whether the queue is paused, and finally whether the worker can reach the API with valid credentials.
  • What has to be operated when self-hosting? An API service, a PostgreSQL database and at least one worker process, plus a reverse proxy and object storage as needed. Serverless capacity is cloud-only, so self-hosted teams provision their own execution environment sized by concurrent runs.
  • How long are runs retained? Hobby keeps seven days, paid tiers extend by contract, and Team adds a 24-hour audit log. For long-term needs, export key metrics to your own storage or upgrade the tier, so historical states remain available during incident work.
  • Can the cloud tier run without serverless capacity? Yes. Starter and above allow workers on your own servers or Kubernetes clusters, so the cloud handles scheduling, state and observability while compute cost returns to your hardware; outbound access and credentials from worker to cloud still need configuration.

Integration & Code Examples

Define a flow with tasks and register a deployment

from prefect import flow, task
from prefect.blocks.system import Secret


@task(retries=3, retry_delay_seconds=30)
def fetch_orders(day: str) -> list[dict]:
    # in a real project read credentials from a block, then call the upstream API
    token = Secret.load("orders-api-token").get()
    return [{"id": "A1001", "day": day}]


@flow(log_prints=True)
def sync_orders(day: str = "2026-11-30") -> int:
    rows = fetch_orders(day)
    print(f"{day}: fetched {len(rows)} orders")
    return len(rows)


if __name__ == "__main__":
    # register a deployment with a daily schedule
    sync_orders.serve(name="sync-orders-daily", cron="0 2 * * *")

Trigger and inspect runs from the CLI

# start a local worker that pulls from this pool
prefect worker start --pool local-process

# trigger a run now with a parameter override
prefect deployment run "sync-orders-daily/sync-orders-daily" --param day=2026-11-29

# list recent run states and logs
prefect flow-run ls --limit 5

Deployment names combine flow and deployment names, so schedule changes touch the deployment, not the business code.

Community & Resources

Visit Prefect Website → https://www.prefect.io/
Visit Website ↗