+ self._session = None
+
+ # create a dbsession to be managed separately
+ def session(self):
+ Session = sessionmaker()
+ session = Session(bind=self.engine)
+ logger.debug('alchemy.session created session %s' % session)
+ return session
+
+ def close_session(self, session):
+ logger.debug('alchemy.close_session closed session %s' % session)
+ session.close()