add authentication
add built-in cleanup general refactor
This commit is contained in:
parent
20ee543ab4
commit
ba2e896813
15 changed files with 313 additions and 106 deletions
|
|
@ -8,10 +8,7 @@ import configparser
|
|||
alembic = configparser.ConfigParser()
|
||||
alembic.read("alembic.ini")
|
||||
|
||||
try:
|
||||
dburl = alembic.get("alembic", "sqlalchemy.url")
|
||||
except:
|
||||
dburl = config.DBURL
|
||||
dburl = config.DBURL
|
||||
|
||||
engine = create_engine(
|
||||
dburl,
|
||||
|
|
@ -27,7 +24,8 @@ ergoEngine = create_engine(
|
|||
|
||||
SessionMaker = sessionmaker(autocommit=False, autoflush=False, bind=engine, )
|
||||
|
||||
|
||||
def ergoQueryFetchOne(q: str, **kwargs):
|
||||
with ergoEngine.connect() as connection:
|
||||
connection.execute(text("use ergo"))
|
||||
return connection.execute(text(q), kwargs).fetchone()
|
||||
return connection.execute(text(q), kwargs).fetchone()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue