Kafka HTMX is a Flask application that allows you to send messages to a Kafka cluster. The application provides a simple web interface where you can specify the topic, the number of messages to send, and the Kafka cluster to send the messages to.
To set up the Kafka HTMX application, you need to have Python 3.8 or later and Poetry installed on your machine.
- Clone the repository:
git clone https://github.com/yourusername/kafka_htmx.git
cd kafka_htmx
-
Install the dependencies:
poetry install
-
Create a .env file in the root directory of the project and add your configuration variables:
export FLASK_APP=kafka_htmx
To run the Kafka HTMX application, use the flask run command:
poetry run flask run
This will start the application on localhost:5000.
To run the tests for the Kafka HTMX application, use the pytest command:
poetry run pytest