A template and environment for building a RESTful application for anything you can think of.
- Python
- Docker
- MySQL
- Flask
- Gunicorn
-
GET:
http://localhost:<port>/api/v1/users- list of usershttp://localhost:<port>/api/v1/users/<user_id>- single userresponse: 200, 404
-
POST:
http://localhost:<port>/api/v1/users- create userresponse: 201, 404
*json body: {field: value, ...}
-
PUT:
http://localhost:<port>/api/v1/users/<user_id>- update userresponse: 200, 400, 404
*json body: {field: value, ...}
-
DELETE:
http://localhost:<port>/api/v1/users/<user_id>- delete userresponse: 204, 400, 404
git clone https://github.com/FirstShanti/Flask-RESTful-vs-MySQL
-
MYSQL_USER=
username -
MYSQL_ROOT_PASSWORD=
userpassword -
MYSQL_HOST=database
-
MYSQL_PORT=3306
-
MYSQL_DB=
db_name -
APP_SERVER_HOST=0.0.0.0
-
APP_SERVER_PORT=
port -
ENVIRONMENT=
Development or Production -
SECRET_KEY=
secret key
~project path$ docker-compose up