-
pip install Flask-SQLAlchemy
-
pip install flask-marshmallow
-
pip install marshmallow-sqlalchemy
-
pip install mysqlclient
-
run script in
script.sql
to create database and table -
run app by
python app.py
-
how to create a item: view 'create.png'
-
how to get all item: view 'get.png'
-
example payload for create API:
{ "username": "Minh Trieu", "license": "92D1 12345", "gioVao": "12:00", "gioRa": "13:00", "maThe ": "12345" }
-
minhtrieucoder / python_orm_mysql Goto Github PK
View Code? Open in Web Editor NEWThe example about RESTful APIs with Python, ORM and MYSQL