Website:
-
-
Deleted Task reappears (current session)
-
In case if your device gets disconnected the application will sync with the server once connection is established you will see
which will indicate that your tasks are being synced with the server -
All task get synchronized (Might need to refresh / login again)
-
Tech Use HTML + CSS Front End JS Front End & Send Requests Python (flask) Works as an API -
- Materialize Css - Material Design & Responsive Design
- Font Awesome - Icons
-
Package Version gunicorn 19.7.1 Flask 0.12.2 flask-sqlalchemy 2.4.4 -
- Install all required python packages
cd to-do-app/ pip install -r requirements.txt - To run the app ( local )
cd to-do-app/ python app.py - To run the app ( VPS / Hosting )
Please follow hosting providers method to host flask apps.
use command
gunicorn --bind 0.0.0.0:$PORT app:app
- Install all required python packages
-
Please Note you can replace
<url>withhttps://todo.datascience.appif using the hosted serverhttp://127.0.0.1:5000if working locally
-
To check if server is online run
-
Terminal
curl '<url>/connected' -
Postman
GETrequest to<url>/connected
-
Returns:
okmeans server is UP
-
-
Create / Get user API and next task number
(please replace
<username>with your username and<password>with your password)
-
Terminal
curl '<url>/user/<username>/<password>/'
-
Postman
GETrequest to<url>/user/<username>/<password>/
-
Returns:
Data in the form
<api-key>|<next-task-id>
Example:
cabd6c91-0baa-4a55-99d7-1b8f1d15c1e7|1
-
-
To get all task from a user
- Terminal
curl '<url>/api/<api-key>/all'
-
Postman
GETrequest to<url>/api/<api-key>/all
-
Returns:
All tasks in json in the format
{'<task_id>' : { 'task': '<your task>', 'details': '<task details>' } }
Example
{'1': { 'task': 'Call Work', 'details': 'Remember to ask about project XYZ' } } - Terminal
-
To add task for a user
Keys
id: Task Idt: Main task textd: Task details (Optional)
-
Terminal
curl --data "id=<task_id>&t=<task_main_detail>&d=<extra_task_details>" "<url>/api/<api-key>/task"
-
Postman
Postrequest to<url>/api/<api-key>/taskwith above the mentioned key and their values
-
Returns:
ok: Executed successfullyerror: Did not execute
-
-
To Modify task
Keys (include atleast 1)
t: Main task textd: Task details(please replace
<api-key>with your api and<task-id>with your task ID)
-
Terminal
curl --data "t=<task_main_detail>&d=<extra_task_details>" "<url>/api/<api-key>/<task-id>/det"
-
Postman
POSTrequest to<url>/api/<api-key>/<task-id>/detwith above the mentioned key and their values
-
Returns:
ok: Executed successfullyerror: Did not execute
-
-
To delete task (please replace
<api-key>with your api and<task-id>with your task ID)
-
Terminal
curl "<url>/api/<api-key>/delete/<task-id>"
-
Postman
POSTrequest to<url>/api/<api-key>/delete/<task-id>
-
Returns:
ok: Executed successfullyerror: Did not execute
-
-
- Typing can get slow if server gets overloaded
- Extra task details get cleared sometimes when working offline (may be due to different browsers)
-
- This repository contains files to run/host locally, you will need to do changes according to the hosting provider.








