- Add / Create new transit information.
- Update / Edit transit information.
- Delete transit information.
- Upload / import csv file data to database.
- Dowmload / export csv file.
- Start wampserver/xampp
- Create a database name ' flask_project ' on phpmyadmin
- Open command prompt type ' python '
- Type ' from app import db'
- Type ' db.create_all() '
Rest Api |
---|
GET http://localhost/ |
GET http://localhost/int:id |
POST http://localhost/create/int:id |
POST http://localhost/update/int:id |
POST http://localhost/delete/int:id |
POST http://localhost/upload/ |
GET http://localhost/csv_report/ |
-
Don't send NaN values to the database.
-
Follow the CSV structure when manually creating or entering data into a .csv file.
Example:
-
CSV file you are going to upload no need inculde table field name.
-
Upload feature for this application only accept .CSV files.
-
Upload feature not support multiple files upload.
-
Upload new csv file will update all existing data in the database.
Violation any of the above will cause errors.
- Open command prompt.
- Type 'pip install flask'.
- Type 'pip install flask-sqlalchemy'.
- Type 'flask run' (Running on http://127.0.0.1:5000/).