database.engine

SQLAclhemy engine object for connecting to the ACCRE database

accre.database.engine.create_admin_engine()[source]

Return an sqlalchemy Engine object to connect to the ACCRE admin database. :returns: Engine for the ACCRE admin database :rtype: sqlalchemy.engine.Engine

accre.database.engine.get_default_engine()[source]

The SQLAlchemy engine should generally persist over the application lifetime and can be safely reused between client objects. This helper function provides the admin engine if it has already been instantiated or creates it if not.

accre.database.engine.set_default_engine(engine)[source]

There is need to set a default engine in case an engine has already been registered from a different context. For example: during testing: setup might create the db client using an engine, any other dbclient accesses after that must happen through the same engine

Args:

engine: database engine

Returns:

None