Source code for concurrent.core.db.api
# -*- coding: utf-8 -*-
"""
API for DB connections
"""
from concurrent.core.components.component import Interface
__all__ = ['IDBEngine']
[docs]class IDBEngine(Interface):
"""
A DB engine represents a component that is used to create a sqlalchemy
engine.
"""
[docs] def get_engine():
"""
Return a sqlalchemy engine
"""
[docs] def initdb():
"""
Called from the dbmanager once it gets initialized
"""
[docs] def dbshutdown():
"""
Called from the dbmanager once it gets shutdown
"""