This repo shows how you can create a topic, send a message and listen to a kafka environment with 1 zookeper and 1 broker, which you simulate with docker-compose, using the python programming language.
docker-compose up -dpip install -r requirements.txt
python producer.py
python consumer.pyAlso you can take a look detailed article: https://www.sezerbozkir.com/2021/06/python-ile-apache-kafka-icin-consumer-ve-procuder-olusturma/