Framework overview¶
The whole framework is broken down into following submodules:
pyzenkit.utils
- Module containing various useful utilities.
pyzenkit.jsonconf
- Module for handling JSON based configuration files and directories.
pyzenkit.daemonizer
- Module for taking care of all process daemonization tasks.
pyzenkit.baseapp
- Module for writing generic console applications.
pyzenkit.zenscript
- Module for writing generic console scripts with built-in support for repeated executions (for example by cron-like service).
pyzenkit.zendaemon
- Module for writing generic system services (daemons).
Application types¶
Base application¶
The base application implemented in pyzenkit.baseapp.BaseApp
provides
features usefull for every application including (but not limited to) the following:
- Application configuration service
- Logging service
- Persistent state service
- Application runlog service
- Plugin system
- Application actions
Please see the documentation for pyzenkit.baseapp
in API section for more
in-depth details.
Please see the source code for an example implementation of demo application in
pyzenkit.baseapp.DemoBaseApp
class.
Script¶
The script application implemented in pyzenkit.zenscript.ZenScript
provides the base implementation of generic one-time execution script.
It may be used to implement large variety of applications like backup scripts,
control scripts, etc. These applications are intended to be executed either by user
from terminal, or periodically via cron-like service.
The implementation is based on pyzenkit.baseapp.BaseApp
class, so it
includes all of its features. On top of that there are following additional features:
- Support for executing multiple different commands within one executable.
- Support for multiple execution modes (regular, shell).
- Support for regular executions with defined time intervals.
Please see the documentation for pyzenkit.zenscript
in API section for more
in-depth details.
Please see the source code for an example implementation of demo application in
pyzenkit.zenscript.DemoZenScript
class.
Daemon¶
The daemon application implemented in pyzenkit.zendaemon.ZenDaemon
provides the base implementation of generic daemon.
The implementation is based on pyzenkit.baseapp.BaseApp
class, so it
includes all of its features. On top of that there are following additional features:
- Fully automated daemonization process (detaching, PID files, …)
- Event driven design.
- Support for arbitrary signal handling.
- Support for modularity and reusability with daemon components.
Please see the documentation for pyzenkit.zendaemon
in API section for more
in-depth details.
Please see the source code for an example implementation of demo application in
pyzenkit.zendaemon.DemoZenDaemon
class.