flask-confluent-kafka
A simple Flask extension for integrating confluent-kafka producers and consumers into a Flask application.
Features
- Configures a Kafka
ProducerandConsumerstraight from your Flask app config. - Optional SASL authentication support (
security.protocol/sasl.mechanism). - Small helper API to produce (
dict/strpayloads, auto-serialized) and consume messages without dealing withconfluent-kafkadirectly. - Register additional named producers/consumers (
add_producer()/add_consumer()), independent of the default pair. - Ships with a
py.typedmarker (PEP 561), so type checkers like mypy/pyright pick up the library's type hints in downstream projects.
Installation
pip install flask-confluent-kafka
# or
uv add flask-confluent-kafka
Requires Python >= 3.13.
Next: Quickstart.
Known limitations
This project is early-stage. See the issue tracker for known bugs and planned improvements.
Changelog
See CHANGELOG.md.
License
GPL-3.0 — see the license field in pyproject.toml.