We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 129cc13 commit 5685205Copy full SHA for 5685205
src/server/_common.py
@@ -2,15 +2,16 @@
2
import time
3
4
from flask import Flask, g, request
5
-from sqlalchemy import event
6
-from sqlalchemy.engine import Connection
+from sqlalchemy import create_engine, event
+from sqlalchemy.engine import Connection, Engine
7
from werkzeug.local import LocalProxy
8
9
from .utils.logger import get_structured_logger
10
-from ._config import SECRET
11
-from ._db import engine
+from ._config import SECRET, SQLALCHEMY_DATABASE_URI, SQLALCHEMY_ENGINE_OPTIONS
12
from ._exceptions import DatabaseErrorException, EpiDataException
13
+engine: Engine = create_engine(SQLALCHEMY_DATABASE_URI, **SQLALCHEMY_ENGINE_OPTIONS)
14
+
15
app = Flask("EpiData", static_url_path="")
16
app.config["SECRET"] = SECRET
17
src/server/_db.py
0 commit comments