finds.dev

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

View on GitHubHomepage ↗

★ 5,223PythonApache-2.0updated Jun 2026

// the take

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.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
5,223
Forks
356
Language
Python
License
Apache-2.0
Last commit
10 Jun 2026

// nearby

If faststream isn't quite it.

All repos →