--- id: faststream version: "0.7.4" license: Apache-2.0 license_treatment: permissive maintenance: active --- # faststream — FastStream: the simplest way to work with a messaging queues License: permissive · Maintenance: active · Downloads: 1.4M/mo ## What it is and what it does FastStream is a framework for building asynchronous, event-driven applications that consume and produce messages across multiple brokers. It provides a unified decorator-based interface that handles message parsing, serialization, and networking automatically. The framework integrates dependency injection, validation via Pydantic or Msgspec, and AsyncAPI documentation generation to reduce boilerplate while keeping underlying broker capabilities accessible. Typical use cases include building streaming microservices, message queue consumers and producers, and data pipeline components. It supports Kafka, RabbitMQ, NATS, Redis, and MQTT out of the box with optional extras for each broker. The framework works with modern async Python (3.10+) and integrates with HTTP frameworks, making it suitable for hybrid synchronous-asynchronous architectures. Use it for: - Build microservices with minimal boilerplate using decorators and type annotations for message handling. - Create real-time data pipelines that consume from one broker topic and publish to another with automatic validation. - Generate AsyncAPI documentation automatically from your message handlers without manual schema definition. - Test message-driven services in-memory without spinning up broker instances in your CI/CD pipeline. - Integrate event-driven logic into applications using the built-in plugin support. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. An asynchronous Python framework for building event-driven applications with support for multiple message brokers and automatic AsyncAPI documentation generation. Yes. FastStream is actively maintained, permissively licensed under Apache-2.0, has low install friction, and addresses a real need for simplified event-driven development across multiple brokers. It is production-stable with no known vulnerabilities. Install it if you are building message-driven microservices and want to reduce boilerplate. ## Install pip install faststream uv add faststream poetry add faststream ## Installing faststream Before you install: Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release 7 days ago and strong community engagement (5304 GitHub stars). Requires Python 3.10 or later. License in practice: Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for most production and proprietary projects. Quickstart: pip install 'faststream[kafka]' from faststream import FastStream from faststream.kafka import KafkaBroker broker = KafkaBroker("localhost:9092") app = FastStream(broker) @broker.subscriber("in") @broker.publisher("out") async def handle_msg(user: str, user_id: int) -> str: return f"User: {user_id} - {user} registered" Requires a running message broker instance and Python 3.10 or later. Verify before relying: - Performance characteristics and throughput limits under production load. - Compatibility matrix details with specific broker versions. - Overhead of the dependency injection and validation layers compared to raw broker clients. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags message broker framework, event-driven microservices, async message queue, asyncapi documentation, streaming data processing, event consumer producer, kafka rabbitmq nats redis mqtt, async-framework, message-brokers, microservices [View on SkillFed](https://skillfed.io/packages/faststream) · [View on PyPI](https://pypi.org/project/faststream/)