kafka-workshop
  • WWCode Dublin - Kafka Workshop
  • Setup your Environment
  • Start your Kafka server
  • Managing Topics
  • Producer
  • Consumer
  • Python Client - Overview
  • Producer in Python
  • Consumer in Python
Powered by GitBook
On this page
  • Check Python installation
  • Create virtualenv
  • Activate your virtualenv
  • Let's install the required libraries

Python Client - Overview

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

PreviousConsumerNextProducer in Python

Last updated 6 years ago

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

On windows apply the following:

c:\>c:\Python35\python -m venv c:\path\to\myenv

Let's install the required libraries

Remember the repo we asked you to clone over the steps at: 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

Success We are ready to go and build our Producer and Consumer in Python :-)

Setup your Environment