faststream

(★ 5,310)

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

File Explorer

  • .dockerignore
  • .gitignore
  • .pre-commit-config.yaml
  • CITATION.cff
  • CONTRIBUTING.md
  • docker-compose.yaml
  • Dockerfile
  • justfile
  • LICENSE
  • pyproject.toml
  • README.md
  • ruff.toml
  • uv.lock

# Installation Guide

python

Setup Steps

pip install 'faststream[kafka]'

Install FastStream package with Kafka dependencies

python app.py

Run the FastStream application

Key Commands

pip install 'faststream[kafka]'

Install FastStream with Kafka broker support.

pip install 'faststream[rabbit]'

Install FastStream with RabbitMQ broker support.

The message broker you intend to use must be running locally or remotely.

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

pip install

View Details ▼

Install Python packages.

pip install {{package1 package2 ...}}

Install one or more packages:

pip install {{package1 package2 ...}} {{[-U|--upgrade]}}

Upgrade all specified packages to the latest version, installing any that are not already present:

pip install {{package}}=={{version}}

Install a specific version of a package:

🔍

pip

View Details ▼

Python package manager.
Some subcommands such as `install` have their own usage documentation.

pip install {{package}}

Install a package (see `pip install` for more install examples):

pip install --user {{package}}

Install a package to the user's directory instead of the system-wide default location:

pip install {{[-U|--upgrade]}} {{package}}

Upgrade a package:

🔍

pytest

View Details ▼

Run Python tests.

pytest {{path/to/test_file1.py path/to/test_file2.py ...}}

Run tests from specific files:

pytest -k {{expression}}

Run tests with names matching a specific [k]eyword expression:

pytest {{[-x|--exitfirst]}}

Exit as soon as a test fails or encounters an error:

// repository documentation