Skip to content

Very simple Flask API that integrates with an MQTT broker to receive and return data in JSON format.

Notifications You must be signed in to change notification settings

yos-r/domotique-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

✨ Simple Flask API with MQTT Integration

This repository contains a very simple Flask API that integrates with an MQTT broker to receive and return data in JSON format.

Dependencies

Flask and MQTT library for connecting with the broker and subscribing to messages

   pip install Flask paho-mqtt

Running

Run the application

python app.py

Example : using the hello endpoint Returns JSON data received from an MQTT topic climat

curl localhost:5000/hello

Output

{
  "data": "{\"humidity\": 90.5, \"temp\": 45.8}"
}

About

Very simple Flask API that integrates with an MQTT broker to receive and return data in JSON format.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages