Added OpenID registration and login.
[zzz-floof.git] / floof / model / meta.py
1 """SQLAlchemy Metadata and Session object"""
2 from sqlalchemy import MetaData
3 from sqlalchemy.ext.declarative import declarative_base
4 from sqlalchemy.orm import scoped_session, sessionmaker
5
6 __all__ = ['Session', 'engine', 'TableBase']
7
8 # SQLAlchemy database engine. Updated by model.init_model()
9 engine = None
10
11 # SQLAlchemy session manager. Updated by model.init_model()
12 Session = scoped_session(sessionmaker())
13
14 # Base class for declarative; creates its own metadata object
15 TableBase = declarative_base()
16 metadata = TableBase.metadata