Giter Site home page Giter Site logo

b5u2423 / display-realtime-data-python-flask-mysql Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 603 KB

A simple real-time display system using Python, Flask and MySQL

License: MIT License

Python 43.82% C++ 14.44% CSS 3.58% JavaScript 17.30% HTML 20.87%
flask mysql python realtime-rendering

display-realtime-data-python-flask-mysql's Introduction

Display Realtime Data With Python, Flask and MySQL

About

A simple system with 2 servers: a HTTP server for handling the data from the IoT devices, and a WebSocket server for sending real-time data to the client, which then will render the chart accordingly.

System Overview An overview of the system.

Example Chart The rendered real-time data page.

Built With

This project is built with all the following frameworks/libraries/plugins:

Getting Started

Prerequisites

You MUST have Python, Flask and MySQL installed, if not, Google how to. Most of the required Python libraries are noted the requirement.txt file, so run the following command to automatically install them:

pip install -r requirement.txt

Installing

Just clone the repo and run. All the JavaScript libraries have been included in the vendors folder so the WebSocket server can be deployed locally without Internet connection.

git clone https://github.com/B5u2423/Display-Realtime-Data-Python-Flask-MySQL.git python-display-realtime

(back to top)

Deployment

Run http-server.py if you want to receive data from the sensors and save it to the database. I use an ESP32 with a DHT11 sensor to gather data on temperature and humidity. The HTTP server is running on port 8090, configure the URL according to your IP and the port in the device sketch. Example source code of the ESP32 is included the sketch folder.

Run websock-server.py, the WebSocket server is running on port 8091, connect to it at localhost:8091.

(back to top)

License

Distributed under the MIT License - see LICENSE the for more details.

(back to top)

display-realtime-data-python-flask-mysql's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.