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.
- Host: GitHub
- URL: https://github.com/graphtylove/kafka-python-demo
- Owner: GraphtyLove
- Created: 2022-09-26T14:51:38.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-27T07:43:57.000Z (over 3 years ago)
- Last Synced: 2025-03-03T19:41:03.280Z (12 months ago)
- Topics: docker, docker-compose, kafka, kafka-python, python, queue
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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`