What is PyWorkflow?
PyWorkflow is a workflow orchestration framework created by the team behind FlowHunt. It enables you to build complex, long-running business processes as simple Python code, handling the hard parts of distributed systems:- Fault tolerance - Automatic recovery from failures
- Automatic retries - Configurable retry strategies with backoff
- State management - Event sourcing for complete auditability
- Horizontal scaling - Distribute work across multiple workers
Why PyWorkflow?
Building reliable, long-running processes is hard. Traditional approaches require you to manually handle:- What happens when a server restarts mid-process?
- How do you retry failed operations without duplicating work?
- How do you pause for hours or days without holding connections?
- How do you track what happened and when?
Key Features
Distributed by Default
All workflows execute across Celery workers for horizontal scaling. Start with one worker, scale to hundreds.
Durable Execution
Event sourcing ensures workflows can recover from any failure. Every state change is recorded and can be replayed.
Time Travel
Sleep for minutes, hours, or days with automatic resumption. Workflows suspend without holding resources.
Fault Tolerant
Automatic retries with configurable backoff strategies. Distinguish between transient and permanent failures.
Zero-Resource Suspension
Workflows suspend without holding connections, threads, or memory. Resume on any available worker.
Production Ready
Built on battle-tested Celery and Redis. Comprehensive logging and monitoring support.
How It Works
PyWorkflow uses event sourcing to achieve durable, fault-tolerant execution:- All state changes are recorded as events in an append-only log
- Deterministic replay enables workflow resumption from any point
- Complete audit trail of everything that happened in the workflow
Quick Example
Use Cases
PyWorkflow is ideal for:- User onboarding flows - Multi-step processes with delays
- Order processing - Payment, fulfillment, and notification pipelines
- Data pipelines - ETL workflows with retry and monitoring
- Scheduled tasks - Complex scheduling with dependencies
- Approval workflows - Human-in-the-loop processes
- Notification sequences - Drip campaigns and follow-ups