An open API service indexing awesome lists of open source software.

https://github.com/graphtylove/kafka-python-demo

Small example on how to use Kafka with python and docker.
https://github.com/graphtylove/kafka-python-demo

docker docker-compose kafka kafka-python python queue

Last synced: 5 months ago
JSON representation

Small example on how to use Kafka with python and docker.

Awesome Lists containing this project

README

          

# Python with Kafka

Small example of how to use Kafka with Python.

## Requirements
- Python 3.10
- Docker
- Docker Compose
- Install python dependencies with `pip install -r requirements.txt`

## Run
- Start Kafka with `docker-compose up -d`
- Run the consumer with `python consumer.py`
- Run the API with `uvicorn api:app --reload`
- Send a message with the API, you can see the doc at: `http://localhost:8000/docs`
- Test the system with `python test.py`