X-Git-Url: http://git.veekun.com/zzz-floof.git/blobdiff_plain/7913f8d5b2d58dbd8db4503378eddb00578e90a7..db4c5f0b56d22815ecc31754271797b2401c9458:/floof/model/meta.py diff --git a/floof/model/meta.py b/floof/model/meta.py index 7992ce1..2992ae7 100644 --- a/floof/model/meta.py +++ b/floof/model/meta.py @@ -1,11 +1,11 @@ -"""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())