mentat.plugin.app.eventstorage module¶
This Mentat application plugin provides functions for accessing event 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.eventstorage.EventStoragePlugin()
That will yield following results:
The application object will have a
eventservice
attribute containing reference to event storage service represented bymentat.services.eventstorage.EventStorageService
.
-
class
mentat.plugin.app.eventstorage.
EventStoragePlugin
(settings=None)[source]¶ Bases:
pyzenkit.baseapp.ZenAppPlugin
Implementation of Mentat application plugin providing functions for accessing SQL database. It is usable both in script and daemon modules.
-
configure
(application)[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
application – Reference to the parent application.
-
setup
(application)[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
application – Reference to the parent application.
-