Models and migrations for requests

This commit is contained in:
richard-dds
2018-07-23 14:58:26 -04:00
committed by dandds
parent 543250377c
commit 024051ae07
12 changed files with 401 additions and 62 deletions

8
atst/database.py Normal file
View File

@@ -0,0 +1,8 @@
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
def make_db(config):
engine = create_engine(config['default']['DATABASE_URI'])
session = scoped_session(sessionmaker(bind=engine))
return session