diff --git a/aim/services.py b/aim/services.py index a55d52d..b3dffdc 100644 --- a/aim/services.py +++ b/aim/services.py @@ -1,7 +1,14 @@ from types import SimpleNamespace import os +import sqlalchemy as sa S = SimpleNamespace() -S.mysql_database = f'mysql+mysqldb://{os.environ["MARIADB_USER"]}:{os.environ["MARIADB_PASSWORD"]}@{os.environ["DATABASE_HOST"]}/{os.environ["MARIADB_DATABASE"]}' +S.mysql_database = sa.engine.URL.create( + drivername="mysql+mysqldb", + username=os.environ["MARIADB_USER"], + password=os.environ["MARIADB_PASSWORD"], + host=os.environ["DATABASE_HOST"], + database=os.environ["MARIADB_DATABASE"], +) S.test_database = "sqlite:///:memory:" S.ci_on = os.getenv("CI")