Skip to content

Latest commit

 

History

History
51 lines (44 loc) · 954 Bytes

README.md

File metadata and controls

51 lines (44 loc) · 954 Bytes

Python MQTT example

Example application using MQTT in Python.

Requirements

  • Python3 > 3.9.*

Getting started

  • Clone the repository
git clone https://github.com/alptbz/mqttdemo
  • Change into repository
cd mqttdemo
  • Create venv
python -m venv env
  • Activate enviroment
# Linux:
source env/bin/activate

# Windows (PowerShell):
.\env\Scripts\activate

# Windows (bash):
source env/Scripts/activate
  • Install requirements
python -m pip install -r requirements.txt
  • Create own config.py and insert credentials and connection information
cp config.template.py config.py
vim config.py
  • Run
python main.py

Notes

  • Use python3 instead of python if you're using Linux

Links