https://github.com/ahmnouira/iot_platform_flask
IoT Platform Developed using flask PFE 2019.
https://github.com/ahmnouira/iot_platform_flask
card-data docker docker-container flask iot-platform machine python standalone
Last synced: about 1 year ago
JSON representation
IoT Platform Developed using flask PFE 2019.
- Host: GitHub
- URL: https://github.com/ahmnouira/iot_platform_flask
- Owner: ahmnouira
- License: mit
- Created: 2019-06-15T03:34:40.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T20:32:48.000Z (over 2 years ago)
- Last Synced: 2025-04-04T10:40:05.193Z (about 1 year ago)
- Topics: card-data, docker, docker-container, flask, iot-platform, machine, python, standalone
- Language: CSS
- Homepage:
- Size: 27.9 MB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IoT Platform developped using flask
This is an IoT platform developped using flask where people can veiw the temperature, humidity and gaz state
## Overview
Some photos about this project:





## Running this app
This app is designed to run in different ways:
1. As a standalone app running on your machine
1. As a Docker container running on your machine
## As a standalone app
1. install [python](https://www.python.org/)
2. `git clone` the project then `cd` into the directory
3. run `virtualenv -p /usr/bin/python3 venv`or `python -m venv venv` to create a virtual environment
4. activate it using `source venv/bin/activate`
5. `pip install -r requirements.txt` to install the app libaries and it dependencies
### setting up the databse
1. you need to have [mysql server](https://www.mysql.com/) installed in your machine, if you are working in linux just typr ` sudo apt-get update && apt-get install mysql-server`
2. type `sudo mysql` to enter to the database
3. .....
#### run the app
After installing, run the server using `flask run`
Access the running app in a browser at the URL written to the console (most likely http://localhost:5000)
## As a Docker container running on your machine
1. install [Docker](https://www.docker.com/)
2. install [Docker compose toolset](https://docs.docker.com/compose/install/)
2. run `docker version` to check if docker is installed
2. run `docker-compose --version` to check if docker-compose is installed
3. run `docker-compose up -d --build` to build the docker image of the flask app and mysql database
3. `docker images` list the local avaible images
4. go to http://localhost:8000 to start the container