mentat.plugin.app.sqlstorage module

This Mentat application plugin provides functions for accessing SQL database. It is usable both in script and daemon modules.

The biggest advantage when using this plugin is that it automatically retrieves correct database configurations from application configuration tree and opens the connection to database storage.

This application plugin is implemented using the pyzenkit.baseapp framework and it is based on pyzenkit.baseapp.ZenAppPlugin. See the documentation for in-depth details.

Example usage

Using the plugin like in following way:

mentat.plugin.app.sqlstorage.SQLStoragePlugin()

That will yield following results:

class mentat.plugin.app.sqlstorage.SQLStoragePlugin(settings=None)[source]

Bases: ZenAppPlugin

Implementation of Mentat application plugin providing functions for accessing SQL database. It is usable both in script and daemon modules.

configure(app)[source]

Configure application. This method will be called from pyzenkit.baseapp.BaseApp._configure_plugins() and it further updates current application configurations.

This method is part of the setup stage of application`s life cycle.

Parameters

app – Reference to the parent application.

setup(app)[source]

Configure application. This method will be called from pyzenkit.baseapp.BaseApp._stage_setup_plugins() and it further updates current application configurations.

This method is part of the setup stage of application`s life cycle.

Parameters

app – Reference to the parent application.