Package: daemonpy
Creating Daemon processdaemonpyis package for creating Daemon processes.Developed inpythoncode:100%.The README is used to introduce the modules and provide instructions on
how to install the modules, any machine dependencies it may have and any
other information that should be provided before the modules are installed.Table of ContentsInstallationInstall using pipInstall using buildInstall using py setupInstall using dockerUsageDependenciesPackage structureDocsCopyright and LicenceInstallationUsed next development environmentCurrently there are three ways to install packageInstall process based on using pip mechanismInstall process based on build mechanismInstall process based on setup.py mechanismInstall process based on docker mechanismInstall using pipPython package is located atpypi.org.You can install by using pip# python3pip3installdaemonpyInstall using buildNavigate torelease pagedownload and extract release archive.To installdaemonpytype the followingtarxvzfdaemonpy-x.y.z.tar.gzcddaemonpy-x.y.z# python3pip3install-rrequirements.txt
python3-mbuild
pip3installdist/daemonpy-x.y.z-py3-none-any.whlInstall using py setupNavigate torelease pagedownload and extract release archive.To installdaemonpy, locate and run setup.py with argumentstarxvzfdaemonpy-x.y.z.tar.gzcddaemonpy-x.y.z# python3pip3install-rrequirements.txt
python3setup.pyinstall_lib
python3setup.pyinstall_egg_infoInstall using dockerYou can use Dockerfile to create image/container.UsageCreate short example#!/usr/bin/env python'''Modulemydaemon.pyCopyrightCopyright (C) 2020 - 2024 Vladimir Roncevic <elektron.ronca@gmail.com>mydaemon is free software: you can redistribute it and/or modify itunder the terms of the GNU General Public License as published by theFree Software Foundation, either version 3 of the License, or(at your option) any later version.mydaemon is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the GNU General Public License for more details.You should have received a copy of the GNU General Public License alongwith this program. If not, see <http://www.gnu.org/licenses/>.InfoDefines class MyDaemon with attribute(s) and method(s).Set an operation for Daemon process.'''importsysfromtimeimportsleeptry:fromdaemonpyimportDaemonexceptImportErrorasats_error:MESSAGE='\n{0}\n{1}\n'.format(__file__,ats_error)sys.exit(MESSAGE)# Force close python ATS ##############################classMyDaemon(Daemon):'''Defines class MyDaemon with attribute(s) and method(s).Set an operation for Daemon process.It defines::attributes:| None:methods:| run - run Daemon process (defined method).'''defrun(self):'''Run Daemon process with time sleep example.:exceptions: None'''whileTrue:sleep(1)if__name__=='__main__':DAEMON=MyDaemon('/tmp/daemon-example.pid')DAEMON.usage(sys.argv[1])DependenciesThese modules requires other modules and librariesdaemonpy - Python App/Tool/Script UtilitiesPackage structuredaemonpyis based on OOP.Package structuredaemonpy/├──daemon_usage.py├──file_descriptor.py├──file_process_id.py├──__init__.py└──unix_operations.pyDocsMore documentation and info atdaemonpy.readthedocs.iowww.python.orgContributingContributing to daemonpyCopyright and licenceCopyright (C) 2020 - 2024 byvroncevic.github.io/daemonpydaemonpyis free software; you can redistribute it and/or modify
it under the same terms as Python itself, either Python version 2.x/3.x or,
at your option, any later version of Python 3 you may have available.Lets help and support PSF.