Python

Dapr offers a variety of subpackages to help with the development of Python applications. Using them you can create Python clients, servers, and virtual actors with Dapr.

Prerequisites

Installation

To get started with the Python SDK, install the main Dapr Python SDK package.

pip install dapr

Note: The development version will contain features and behavior that will be compatible with the pre-release version of the Dapr runtime. Only tagged releases are published to PyPI, so install the development version from the GitHub repository. Make sure to uninstall any stable versions of the Python SDK before installing it.

pip install "dapr @ git+https://github.com/dapr/python-sdk.git@main"

The SDK requires protobuf 6.33.5 or later and grpcio and grpcio-status 1.81.1 or later. pip installs matching versions automatically. If your project pins protobuf, grpcio or grpcio-status to an earlier version, update the pins before you upgrade the SDK.

Install extensions

From Dapr 1.19, the SDK extensions are optional extras of the dapr package. Install the extras that you need in the same command as the SDK, for example:

pip install "dapr[workflow]"
pip install "dapr[fastapi,grpc]"
ExtraExtensionImport path
dapr[fastapi]FastAPIdapr.ext.fastapi
dapr[flask]Flaskdapr.ext.flask
dapr[grpc]gRPCdapr.ext.grpc
dapr[workflow]Workflowdapr.ext.workflow
dapr[databricks]Databricksdapr.ext.databricks
dapr[langgraph]LangGraph checkpoint persistencedapr.ext.langgraph
dapr[strands]Strands agent session managementdapr.ext.strands

To install every extension, use pip install "dapr[all]".

Available subpackages

SDK imports

Python SDK imports are subpackages included with the main SDK install, but need to be imported when used. The most common imports provided by the Dapr Python SDK are:

Client

Write Python applications to interact with a Dapr sidecar and other Dapr applications, including stateful virtual actors in Python

Actors

Create and interact with Dapr's Actor framework.

Conversation

Use the Dapr Conversation API (Alpha) for LLM interactions, tools, and multi-turn flows.

Learn more about all of the available Dapr Python SDK imports.

SDK extensions

SDK extensions mainly work as utilities for receiving pub/sub events, programatically creating pub/sub subscriptions, and handling input binding events. While you can acheive all of these tasks without an extension, using a Python SDK extension proves convenient.

gRPC

Create Dapr services with the gRPC server extension.

FastAPI

Integrate with Dapr Python virtual actors and pub/sub using the Dapr FastAPI extension.

Flask

Integrate with Dapr Python virtual actors using the Dapr Flask extension.

Workflow

Author workflows that work with other Dapr APIs in Python.

Databricks

Turn Databricks Lakeflow streaming records into durable Dapr Workflow executions.

Learn more about the Dapr Python SDK extensions.

Try it out

Clone the Python SDK repo.

git clone https://github.com/dapr/python-sdk.git

Walk through the Python quickstarts, tutorials, and examples to see Dapr in action:

SDK samplesDescription
QuickstartsExperience Dapr’s API building blocks in just a few minutes using the Python SDK.
SDK samplesClone the SDK repo to try out some examples and get started.
Bindings tutorialSee how Dapr Python SDK works alongside other Dapr SDKs to enable bindings.
Distributed Calculator tutorialUse the Dapr Python SDK to handle method invocation and state persistent capabilities.
Hello World tutorialLearn how to get Dapr up and running locally on your machine with the Python SDK.
Hello Kubernetes tutorialGet up and running with the Dapr Python SDK in a Kubernetes cluster.
Observability tutorialExplore Dapr’s metric collection, tracing, logging and health check capabilities using the Python SDK.
Pub/sub tutorialSee how Dapr Python SDK works alongside other Dapr SDKs to enable pub/sub applications.

More information

Serialization

Learn more about serialization in Dapr SDKs.

PyPI

Python Package Index

Last modified October 18, 2026: Update Python SDK docs for 1.19 (07cd95360)