ag2ai/faststream
FastStream is an asynchronous Python framework for building event-driven applications. It brings together message broker integration, dependency injection, validation, testing utilities, and AsyncAPI documentation generation in a single toolkit observed · 2026-08-28
Health v2 · maintenance only
98/100
- Activity 99
- Release rhythm 96
- Longevity 97
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 10
- age_days: 1371
- days_rel: 26
- days_push: 7
- n_releases_24m: 48
Adoption not part of the score
5316 stars · 383 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
FastStream is an asynchronous Python framework for building event-driven applications on top of message brokers like Kafka, RabbitMQ, NATS, Redis, and MQTT. It provides decorator-based producers/consumers, Pydantic or msgspec validation, dependency injection, in-memory testing without a broker, OpenTelemetry/Prometheus observability, and automatic AsyncAPI documentation generation.
Use cases
- build kafka consumers in python
- produce and consume rabbitmq messages with validation
- generate asyncapi docs from code
- test message handlers without a running broker
- build streaming microservices with nats jetstream
- add opentelemetry tracing to message consumers
- integrate kafka subscribers into a fastapi app
- publish test messages to a broker from the cli
When to choose
- you want FastAPI-style ergonomics for message brokers instead of HTTP
- you need AsyncAPI contracts generated automatically from handlers
- you want broker-agnostic code across Kafka, RabbitMQ, NATS, Redis, and MQTT
- you need broker testing in CI without containers
- you want built-in observability middleware for event-driven services
When to avoid
- you need a broker not covered by Kafka, RabbitMQ, NATS, Redis, or MQTT
- you want a heavy streaming platform with built-in state stores or stream processing engines like Flink
- your project is synchronous and cannot use asyncio
- you need direct low-level control and prefer raw broker clients
Facets
framework · maturity active
message-queue serialization testing api-framework middleware tracing monitoring cli documentation microservices backend developer-tools python cross-platform cli kafka rabbitmq nats redis-streams mqtt asyncapi event-driven pydantic msgspec fastapi-integration opentelemetry stream-processing messaging data-engineering docker
10 sources
- readme: https://github.com/ag2ai/faststream · fetched 2026-08-28 · 0219bfe3d1a2
- homepage: http://faststream.ag2.ai/latest/ · fetched 2026-08-29 · 1f84e74052f7
- site_page: http://faststream.ag2.ai/latest/getting-started · fetched 2026-08-29 · 064b1161c6e0
- site_page: http://faststream.ag2.ai/latest/getting-started/contributing/CONTRIBUTING · fetched 2026-08-29 · 70ac99085421
- site_page: https://faststream.ag2.ai/latest/getting-started/observability/opentelemetry · fetched 2026-08-29 · f770d35c6639
- site_page: https://faststream.ag2.ai/latest/getting-started/subscription/msgspec · fetched 2026-08-29 · 5f8668c11a35
- site_page: http://faststream.ag2.ai/latest/getting-started/subscription/test · fetched 2026-08-29 · 60449e43c87f
- site_page: http://faststream.ag2.ai/latest/getting-started/cli · fetched 2026-08-29 · fc5d6a186448
- site_page: http://faststream.ag2.ai/latest/getting-started/integrations/fastapi · fetched 2026-08-29 · bdf3a0838a98
- registry_pypi: https://pypi.org/pypi/faststream/json · fetched 2026-08-29 · 1969afd529eb
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| ag2ai/faststream | main | 98 |
For agents
markdown · JSON · MCP: product_card(name="ag2ai/faststream")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem