Step 1 : Install Dependency - pip install -r requirements.txt
Step 2 : Run the server - python server.py (server will start on http://localhost:8000)
Step 3 : Run CLI command to CRUD task (python command.py ) - Commands: 1. add (add task) 2. listtask (list of task) 3. taskview (detail of task) 4. delete (delete task) 5. update (update the task) 6. complete (Mark Task Complete)
- CLI (Command) Usage:
1. python commands.py add
2. python commands.py listtask
3. python commands.py taskview
4. python commands.py delete
5. python commands.py update
6. python commands.py complete
API Endpoints:
- GET /all_task
- GET /task_detail/<task_id>
- POST /create_task Body: { "title": "Task title", "description": "Task description", "task_priority": "Low | Medium | High" }
- PUT /update_task/<task_id> Body: { "title": "Task title", "description": "Task description", "task_priority": "Low | Medium | High" }
- PUT /complete_task/<task_id>
- DELETE /delete_task/<task_id>
ASSUMPTIONS:
- json storage file used
- task id generated using uuid
- for validation only titel is required
- if no priority set it automatically takes low