MySQL and Flask Tutorial

It’s common when building a backend to access a database for API’s and other situations. Luckily with Python, there is an easy module for accessing a MySQL database to make queries. This post will show you how to use MySQL in Flask so that you can use databases in your app easily. Install MySQL Package for Python Flask To install the required Python package for working with a MySQL database in Flask, we will use “pip”. I recommend doing this from a virtual environment, if you need help with that check out my post on setting up a Python Virtual Environment. The package that we want to install is called, flask-mysql-connector. This package will handle the communication between Flask and the MySQL database. ...

02-26-2021 · Adam