This is a back-end code repository.
This is a full featured Task Management REST API back-end built with flask and MySQL.
Features include:
- Full CRUD features for Task instances.
- Swagger API docs online
To use this code, you'll need a Python environment or Docker-compose environment.
We strongly recommend using docker-compose for this project
git git@github.com:tainenko/flask-api.git
cd flask-api
docker-compose build && docker-compose up
- Python 3.7
- Flask 1.1
- uWSGI LTS
- MySQL 8.0.23 (Docker Image: mysql/mysql-server:8.0.23)
- nginx 1.19.5
- Ubuntu 18.04
- Docker
- flasgger
- Spec
- Fields of task:
- name
- Type: String
- status
- Type: Bool
- Value
- 0=Incomplete
- 1=Complete
- name
- Reponse headers
- Content-Type=application/json
- Fields of task:
{
"result": [
{"id": 1, "name": "name", "status": 0}
]
}
request
{
"name": "買晚餐"
}
response status code 201
{
"result": {"name": "買晚餐", "status": 0, "id": 1}
}
request
{
"name": "買早餐",
"status": 1
"id": 1
}
response status code 200
{
"name": "買早餐",
"status": 1,
"id": 1
}
response status code 200