finds.dev← search

// the find

ag2ai/faststream

★ 5,223 · Python · Apache-2.0 · updated Jun 2026

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

FastStream is a Python async framework for writing message broker consumers and producers with a FastAPI-style decorator API. It supports Kafka, RabbitMQ, NATS, Redis, and MQTT under a single interface, with Pydantic validation, DI, and automatic AsyncAPI doc generation baked in. Aimed at teams building event-driven microservices who want the FastAPI experience without rolling their own broker glue.

The in-memory TestBroker for unit testing is genuinely useful — you can write fast CI tests without spinning up Kafka or Rabbit, and the test surface matches production behavior closely. The FastAPI router integration is a clean escape hatch: bolt it into an existing FastAPI app with no lifecycle juggling. AsyncAPI doc generation that stays in sync with actual handler signatures is rare and practically valuable for teams with multiple services needing contract visibility. Msgspec support as an alternative to Pydantic is a good call — it's measurably faster for high-throughput consumers and the opt-in design means you don't pay for it if you don't need it.

Pre-1.0 versioning with breaking changes per minor release is a real adoption risk for anything production-critical — the two-version deprecation window softens it, but you're still tracking a moving target. The unified API is explicitly limited, so anyone hitting Kafka partition-level operations or RabbitMQ exchange topology will end up mixing FastStream decorators with raw aiokafka/aio-pika calls, which creates two mental models in the same codebase. Error handling and dead-letter queue patterns are not prominent in the docs — for event-driven systems, that's a gap that will bite you on day two of production. The ag2ai org rebrand (forked from airtai) adds uncertainty about long-term stewardship.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →