flask sqlalchemy check if database exists code example
Example: sqlalchemy check if database exists
# pip install sqlalchemy-utils
from sqlalchemy_utils.functions import database_exists
if database_exists(app.config["SQLALCHEMY_DATABASE_URI"]):
# do stuff