Use pymysql for sql connection.

This commit is contained in:
alwayscompiling
2022-12-10 16:12:21 -05:00
parent 7e23ac14ff
commit c67e9ae617
3 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ from sqlalchemy.ext.automap import automap_base
from utilities import config
# connect with sql alchemy and autoload schema
url = f"mysql://{config.SQL_USER}:{config.SQL_PASS}@{config.SQL_HOST}/{config.SQL_DB}"
url = f"mysql+pymysql://{config.SQL_USER}:{config.SQL_PASS}@{config.SQL_HOST}/{config.SQL_DB}"
engine = create_engine(url)
Base = automap_base()
Base.prepare(autoload_with=engine)