skillfed

dapr-ext-fastapi

Dapr FastAPI Extension for the Dapr Python SDK.

dapr-ext-fastapi v1.18.3 89.6K downloads/30d#13,646 on PyPI1,015
Permissive license Apache-2.0 Active released

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-fastapi

uv

uv add dapr-ext-fastapi

poetry

poetry add dapr-ext-fastapi

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

dapr fastapi integrationdistributed application runtime fastapidapr service mesh fastapidapr python sdk fastapifastapi dapr extensiondapr messaging fastapidapr state management fastapi
daprmicroservicesdistributed-systems

More Application Frameworks packages