dapr-ext-fastapi
Dapr FastAPI Extension for the Dapr Python SDK.
What it is and what it does
Dapr-ext-fastapi is an extension that bridges the Dapr distributed application runtime with FastAPI applications. It allows you to build FastAPI services that participate in Dapr's service mesh, gaining access to Dapr's building blocks (state management, pub/sub, service-to-service calls, secrets, and configuration) without writing low-level Dapr client code directly. The package wraps FastAPI's application instance and provides a simplified interface to register Dapr-aware routes and handlers.
The package is built on top of three core dependencies: dapr (the Python SDK for Dapr), fastapi (the web framework), and uvicorn (the ASGI server). It is actively maintained, supports modern Python versions from 3.10 through 3.14, and carries no known security vulnerabilities. The Apache-2.0 license permits commercial use with attribution.
Use it for:
- Build microservices in a Dapr service mesh that need HTTP endpoints while leveraging Dapr's state and messaging capabilities.
- Add Dapr-based service-to-service communication to an existing FastAPI application without rewriting core logic.
- Implement pub/sub message handlers in FastAPI routes that integrate with Dapr's pub/sub building block.
- Create distributed applications where FastAPI services need to share state through Dapr's state management layer.
- Develop cloud-native applications on Kubernetes using Dapr sidecars alongside FastAPI services.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates Dapr distributed application runtime with FastAPI web applications, enabling service-to-service communication, state management, and pub/sub messaging through FastAPI endpoints.
Yes. The package is production-stable, actively maintained with a recent release, has no security vulnerabilities, and carries a permissive license. Install friction is low. It is worth installing if you are building FastAPI services within a Dapr architecture or migrating an existing FastAPI application to use Dapr's distributed capabilities.
Install
dapr-ext-fastapi on PyPI
pip
pip install dapr-ext-fastapiuv
uv add dapr-ext-fastapipoetry
poetry add dapr-ext-fastapiInstalling dapr-ext-fastapi
Before you install
Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent release and supports current Python versions (3.10–3.14). Three runtime dependencies (dapr, fastapi, uvicorn) are standard ecosystem choices.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and private projects with minimal restrictions. Attribution is required but there are no copyleft obligations.
Quickstart
pip install dapr-ext-fastapi
from dapr.ext.fastapi import DaprApp
from fastapi import FastAPI
app = FastAPI()
dapr_app = DaprApp(app)
@dapr_app.route('/invoke')
async def invoke_handler():
return {'message': 'Dapr-enabled endpoint'}
Requires Python 3.10 or later and a running Dapr runtime instance to function.
Verify before relying
- Whether this package provides pre-built decorators or helpers beyond basic Dapr SDK wrapping for FastAPI.
- What specific Dapr capabilities (state, pub/sub, service invocation) are exposed through the FastAPI extension.
- Whether the package includes middleware for automatic Dapr context propagation or request tracing.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — dapr, fastapi, uvicorn |
| Maintenance | actively maintained — 30 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 89,596/month — #13,646 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dapr_ext_fastapi-1.18.3-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
daprDapr SDK for Python provides client libraries…
permissive · top 15,000 on PyPI
dapr-ext-workflowExtends the Dapr Python SDK with workflow…
permissive · top 15,000 on PyPI
fastapi-cloudauthIntegrates FastAPI applications with cloud…
permissive · top 15,000 on PyPI
stac-fastapi-apiProvides a FastAPI-based implementation of the…
permissive · top 15,000 on PyPI
fastapi-keycloak-middlewareFastAPI middleware that integrates Keycloak for…
unclear · top 15,000 on PyPI
fastapi-mailSends emails and attachments asynchronously…
permissive · top 5,000 on PyPI
fastapi-mcpAutomatically exposes FastAPI endpoints as…
permissive · top 5,000 on PyPI
fastapi-azure-authAdds Azure Entra ID (formerly Azure AD)…
permissive · top 15,000 on PyPI
onyx-devtoolsA command-line utility that provides developer…
permissive · top 15,000 on PyPI