Build stateful, long-running, reliable workflows using the Dapr Workflow Python SDK with Catalyst. The Dapr Workflow Python SDK provides a powerful way to orchestrate complex business processes using Python.

Prefer to start from a diagram? Use [Workflow Composer](https://docs.diagrid.io/develop/workflows/workflow-composer) to generate a runnable Python Dapr Workflow project from a BPMN flowchart, then iterate with this SDK. For local monitoring of running workflows, use the [Dapr Dev Dashboard](https://docs.diagrid.io/develop/local-development/dev-dashboard).

## Resources

- [Dapr Python SDK GitHub](https://github.com/dapr/python-sdk)
- [Dapr Python SDK PyPI](https://pypi.org/project/dapr/)
- [Dapr Workflow Documentation](https://docs.dapr.io/developing-applications/building-blocks/workflow/)

**Prerequisites:**

- Python 3.8+ ([Download](https://www.python.org/downloads/))
- [Dapr Workflow SDK](https://pypi.org/project/dapr-ext-workflow/)

## Installation

Install the Dapr Workflow SDK via pip:

```bash
# Install Dapr client SDK
pip3 install dapr

# Install Dapr workflow extension
pip3 install dapr-ext-workflow
```

## Core Application

Use the essential components of a Dapr Workflow application (Workflows and Activities) to build and run a workflow application.

- [Develop a Workflow](https://docs.dapr.io/developing-applications/building-blocks/workflow/howto-author-workflow#tabs-03-02-tab) — Learn how to define workflows by implementing the Workflow interface
- [Manage a Workflow](https://docs.dapr.io/developing-applications/building-blocks/workflow/howto-manage-workflow/) — Manage workflows seamlessly via the Python SDK
- [Explore Examples](https://docs.dapr.io/developing-applications/sdks/python/python-sdk-extensions/python-workflow-ext/python-workflow/) — See how workflows coordinate activities, retries, timers, and state queries.

## External Events

Wait for external input and send events to running workflows.

- [Wait for External Event](https://docs.dapr.io/developing-applications/building-blocks/workflow/workflow-patterns/#external-system-interaction) — Wait for external input, such as human approvals or system responses
- [Raise Workflow Event](https://docs.dapr.io/developing-applications/building-blocks/workflow/workflow-patterns/#external-system-interaction) — Send an event to a running workflow from a client or another workflow

## Getting Started

- [Workflow Quickstart](https://docs.diagrid.io/getting-started/quickstarts/workflow) — Get started with workflows in Catalyst
- [Workflow Patterns](https://docs.dapr.io/developing-applications/building-blocks/workflow/workflow-patterns/) — Learn about common workflow patterns
- [Dapr Workflow Documentation](https://docs.dapr.io/developing-applications/building-blocks/workflow/) — Comprehensive Dapr workflow guide
