poppy.core.db.database.Database(name, *args, **kwargs)[source]¶Bases: poppy.core.generic.signals.Signal
A class to manage the connection status to the database and inform all the other controllers connected to this class that the connection appeared or is gone.
bases_manager = <poppy.core.db.database.BaseManager object>¶connectDatabase()[source]¶To make a connection to the database through SQLAlchemy with the parameters in the configuration file.
connectDatabaseAdmin()[source]¶To make a connection to the database through SQLAlchemy with the parameters in the configuration file.
connection(name)[source]¶A decorator in order to provide a wrapper connector to a given database, not polluting too much the code with redundant instructions.
generate_url_admin()[source]¶Generate the URL of the database from the parameters, using database admin
is_available()[source]¶From the package sqlalchemy-utils to check if the database exists, i.e. is connected or not.
is_connected(name)[source]¶Decorator to ensure that a connection exists before running the it.
manager = <poppy.core.generic.manager.Manager object>¶parameters¶query_context()[source]¶A context manager to create a session for a query and be able to close correctly the session when finished, errors, etc.
reflect()[source]¶To make the reflection of model classes to the database for the current engine, in order to be able to use those classes instances as representation of databases.
scoped_session¶A descriptor to cache the execution of a property, and sending the computed value again and again.