The task is to load a csv data into a database and that shall be served as a web application to query the loaded information. The web application leverages information from MySQL database and serve it to the users, as per the request.
- Python - As a backend language for scripting.
- Flask - Python's micro framework for creating web applications.
- MySQL - Database.
- HTML, CSS, JavaScript - User Interface / Frontend
- AWS RDS - MySQL resides in AWS
Pre-requisites
To setup and run this application, Python 3+ is required along with the below modules.
- Flask
- mysql-connector
- pandas
- base64
Steps to run the script that transfers task_data.csv information to database
- Download the transfer_to_db.py from this repository.
- Place the task_data.csv file in the same folder, where transfer_to_db.py resides.
- Open transfer_to_db.py in an IDE, and run the file.
Steps to setup and run the web application to access the data
Once the above pre-requisites are in place, perform the below steps
- Download/Clone this task_data repository and open the app.py in an IDLE.
- Run the app.py file, without changing any folder structure.
- Open a web browser and access the application using, YOUR_IP_ADDRESS:8002 or localhost:8002
For easy of access to the application, without implementation, please go to https://www.maheshkrishnagopal.com/smart_steel_task
Since I am not an expert in UI design, I have referred the template from SoloDev as per link below, https://www.solodev.com/blog/web-design/adding-a-datetime-picker-to-your-forms.stml. However, the modification of the template as per the requirement are taken care as part of the assignment by me, as it is an open source code available on GitHub. Thanks to SoloDev.
This project is licensed under GNU General Public License. Copyright (c) 2020 Maheshkrishna A G