Skip to content

Commit 5685205

Browse files
committed
Remove _db.py
1 parent 129cc13 commit 5685205

File tree

2 files changed

+5
-30
lines changed

2 files changed

+5
-30
lines changed

src/server/_common.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
import time
33

44
from flask import Flask, g, request
5-
from sqlalchemy import event
6-
from sqlalchemy.engine import Connection
5+
from sqlalchemy import create_engine, event
6+
from sqlalchemy.engine import Connection, Engine
77
from werkzeug.local import LocalProxy
88

99
from .utils.logger import get_structured_logger
10-
from ._config import SECRET
11-
from ._db import engine
10+
from ._config import SECRET, SQLALCHEMY_DATABASE_URI, SQLALCHEMY_ENGINE_OPTIONS
1211
from ._exceptions import DatabaseErrorException, EpiDataException
1312

13+
engine: Engine = create_engine(SQLALCHEMY_DATABASE_URI, **SQLALCHEMY_ENGINE_OPTIONS)
14+
1415
app = Flask("EpiData", static_url_path="")
1516
app.config["SECRET"] = SECRET
1617

src/server/_db.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)