Python Client - Overview

Let's build a Producer/Consumer with Python but first let's setup Python env

Check Python installation

Check you have the right version of python installed :)

$ python3 --version

Using Python with virtualenv.

Virtualenv is a tool which allows us to make isolated python environments. With this you can have multiple environments and include library versions as you need for your application.

Create virtualenv

# Choose your path accordingly to your local clone of the repo
python3 -m venv /path/to/new/virtual/environment

Activate your virtualenv

source [virtualenv_path]/bin/activate

Let's install the required libraries

Remember the repo we asked you to clone over the steps at: Setup your Environment follow the next steps:

Go to the producer-consumer folder

cd wwcode-kafka-workshop/producer-consumer

Install the required libraries

pip install -r requirements.txt

Last updated