concurrent.core.db package

Submodules

concurrent.core.db.api module

API for DB connections

class concurrent.core.db.api.IDBEngine[source]

Bases: concurrent.core.components.component.Interface

A DB engine represents a component that is used to create a sqlalchemy engine.

dbshutdown()[source]

Called from the dbmanager once it gets shutdown

get_engine()[source]

Return a sqlalchemy engine

initdb()[source]

Called from the dbmanager once it gets initialized

concurrent.core.db.dbengines module

SQL Alchemy engines

class concurrent.core.db.dbengines.PostGreSQLEngine(compmgr, init=<function __init__ at 0x00000000049BE588>, cls=<class 'concurrent.core.db.dbengines.PostGreSQLEngine'>)[source]

Bases: concurrent.core.components.component.Component

PostGreSQL DB Engine

db_echo

Use SQL Alchemy debug output.

db_host

Host of the postgresql database.

db_name

Name of the postgresql database.

db_pass

Password of the postgresql database.

db_port

Port of the postgresql database.

db_user

User name of the postgresql database.

dbshutdown()[source]

Called from the dbmanager once it gets shutdown

get_engine()[source]

Create a PostGreSQL DB Engine

initdb()[source]

Called from the dbmanager once it gets initialized

exception concurrent.core.db.dbengines.EngineCreationFailedError(message, title=None, show_traceback=False)[source]

Bases: concurrent.core.exceptions.baseerror.BaseError

Error raised when we get an engine and we failed

title = '[DB Engine Error]'

concurrent.core.db.dbmanager module

DataBase Manager

class concurrent.core.db.dbmanager.DatabaseManager(compmgr, init=None, cls=<class 'concurrent.core.db.dbmanager.DatabaseManager'>)[source]

Bases: concurrent.core.components.component.Component

Class that handles connection and high-level database access

db_engines
dbshutdown()[source]

Inform engines that we should shutdown

engines

List of components that implement IDBEngine

initdb()[source]

Initialize all engines we need

Module contents