https://github.com/ramsailopal/flask-mysql-demo
A simple demo of flask with a mysql backend
https://github.com/ramsailopal/flask-mysql-demo
flask mysql python
Last synced: 3 months ago
JSON representation
A simple demo of flask with a mysql backend
- Host: GitHub
- URL: https://github.com/ramsailopal/flask-mysql-demo
- Owner: RamSailopal
- Created: 2022-10-03T08:08:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-05T09:25:39.000Z (over 3 years ago)
- Last Synced: 2025-05-21T05:37:22.600Z (about 1 year ago)
- Topics: flask, mysql, python
- Language: HTML
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# flask-mysql-demo
A simple demo of the Python Flask framework using mysql as a backend
Creates a simple api for adding users to a mysql table

# Provisioning
git clone https://github.com/RamSailopal/flask-mysql-demo.git
cd flask-mysql-demo
docker-compose up
# Backend
On completion of the provisioning of the environment, navigate to http://serveraddress:5000/user to GET and POST data
# Mysql view
mysql> select * from Users;
+----+------+-----+-----+
| id | name | age | sex |
+----+------+-----+-----+
| 1 | Ram | 21 | M |
| 2 | Bob | 52 | M |
+----+------+-----+-----+
2 rows in set (0.00 sec)
# Front-end
A crude front-end to demonstate the use of Jinja templates has been added.
To view the front-end, navigate to:
http://serveraddress:5001