-"""SQLAlchemy Metadata object"""
+"""SQLAlchemy Metadata and Session object"""
from sqlalchemy import MetaData
from sqlalchemy.orm import scoped_session, sessionmaker
-__all__ = ['engine', 'metadata']
+__all__ = ['Session', 'engine', 'metadata']
# SQLAlchemy database engine. Updated by model.init_model()
engine = None
-metadata = MetaData()
-
+# SQLAlchemy session manager. Updated by model.init_model()
+Session = scoped_session(sessionmaker())