{"id":17618244,"url":"https://github.com/vroncevic/daemonpy","last_synced_at":"2025-08-02T02:11:59.758Z","repository":{"id":41847843,"uuid":"298671392","full_name":"vroncevic/daemonpy","owner":"vroncevic","description":"Creating Daemon processes","archived":false,"fork":false,"pushed_at":"2024-07-03T17:06:22.000Z","size":7491,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-31T01:30:34.256Z","etag":null,"topics":["bsd","daemon","daemonize","freebsd","linux","macos","process","python3","qnx","service","unix"],"latest_commit_sha":null,"homepage":"https://vroncevic.github.io/daemonpy","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vroncevic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-25T20:18:28.000Z","updated_at":"2024-07-03T17:04:11.000Z","dependencies_parsed_at":"2024-10-23T02:48:02.756Z","dependency_job_id":null,"html_url":"https://github.com/vroncevic/daemonpy","commit_stats":{"total_commits":63,"total_committers":3,"mean_commits":21.0,"dds":0.1428571428571429,"last_synced_commit":"dbffed191b87d7f734dce9589b74499e496060d1"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/vroncevic/daemonpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vroncevic%2Fdaemonpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vroncevic%2Fdaemonpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vroncevic%2Fdaemonpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vroncevic%2Fdaemonpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vroncevic","download_url":"https://codeload.github.com/vroncevic/daemonpy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vroncevic%2Fdaemonpy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268326739,"owners_count":24232496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bsd","daemon","daemonize","freebsd","linux","macos","process","python3","qnx","service","unix"],"created_at":"2024-10-22T19:38:05.437Z","updated_at":"2025-08-02T02:11:59.722Z","avatar_url":"https://github.com/vroncevic.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Creating Daemon process\n\n\u003cimg align=\"right\" src=\"https://raw.githubusercontent.com/vroncevic/daemonpy/dev/docs/daemonpy_logo.png\" width=\"25%\"\u003e\n\n**daemonpy** is package for creating Daemon processes.\n\nDeveloped in **[python](https://www.python.org/)** code: **100%**.\n\nThe README is used to introduce the modules and provide instructions on\nhow to install the modules, any machine dependencies it may have and any\nother information that should be provided before the modules are installed.\n\n[![daemonpy python checker](https://github.com/vroncevic/daemonpy/actions/workflows/daemonpy_python_checker.yml/badge.svg)](https://github.com/vroncevic/daemonpy/actions/workflows/daemonpy_python_checker.yml) [![daemonpy package checker](https://github.com/vroncevic/daemonpy/actions/workflows/daemonpy_package_checker.yml/badge.svg)](https://github.com/vroncevic/daemonpy/actions/workflows/daemonpy_package.yml) [![GitHub issues open](https://img.shields.io/github/issues/vroncevic/daemonpy.svg)](https://github.com/vroncevic/daemonpy/issues) [![GitHub contributors](https://img.shields.io/github/contributors/vroncevic/daemonpy.svg)](https://github.com/vroncevic/daemonpy/graphs/contributors)\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n**Table of Contents**\n\n- [Installation](#installation)\n    - [Install using pip](#install-using-pip)\n    - [Install using build](#install-using-build)\n    - [Install using py setup](#install-using-py-setup)\n    - [Install using docker](#install-using-docker)\n- [Usage](#usage)\n- [Dependencies](#dependencies)\n- [Package structure](#package-structure)\n- [Docs](#docs)\n- [Copyright and Licence](#copyright-and-licence)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n### Installation\n\nUsed next development environment\n\n![debian linux os](https://raw.githubusercontent.com/vroncevic/daemonpy/dev/docs/debtux.png)\n\n[![daemonpy python3 build](https://github.com/vroncevic/daemonpy/actions/workflows/daemonpy_python3_build.yml/badge.svg)](https://github.com/vroncevic/daemonpy/actions/workflows/daemonpy_python3_build.yml)\n\nCurrently there are three ways to install package\n* Install process based on using pip mechanism\n* Install process based on build mechanism\n* Install process based on setup.py mechanism\n* Install process based on docker mechanism\n\n##### Install using pip\n\nPython package is located at **[pypi.org](https://pypi.org/project/daemonpy/)**.\n\nYou can install by using pip\n\n```bash\n# python3\npip3 install daemonpy\n```\n\n##### Install using build\n\nNavigate to **[release page](https://github.com/vroncevic/daemonpy/releases)** download and extract release archive.\n\nTo install **daemonpy** type the following\n\n```bash\ntar xvzf daemonpy-x.y.z.tar.gz\ncd daemonpy-x.y.z\n# python3\npip3 install -r requirements.txt\npython3 -m build\npip3 install dist/daemonpy-x.y.z-py3-none-any.whl\n```\n\n##### Install using py setup\n\nNavigate to **[release page](https://github.com/vroncevic/daemonpy/releases)** download and extract release archive.\n\nTo install **daemonpy**, locate and run setup.py with arguments\n\n```bash\ntar xvzf daemonpy-x.y.z.tar.gz\ncd daemonpy-x.y.z\n# python3\npip3 install -r requirements.txt\npython3 setup.py install_lib\npython3 setup.py install_egg_info\n```\n\n##### Install using docker\n\nYou can use Dockerfile to create image/container.\n\n### Usage\n\nCreate short example\n\n```python\n#!/usr/bin/env python\n\n'''\n Module\n     mydaemon.py\n Copyright\n     Copyright (C) 2020 - 2024 Vladimir Roncevic \u003celektron.ronca@gmail.com\u003e\n     mydaemon is free software: you can redistribute it and/or modify it\n     under the terms of the GNU General Public License as published by the\n     Free Software Foundation, either version 3 of the License, or\n     (at your option) any later version.\n     mydaemon is distributed in the hope that it will be useful, but\n     WITHOUT ANY WARRANTY; without even the implied warranty of\n     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n     See the GNU General Public License for more details.\n     You should have received a copy of the GNU General Public License along\n     with this program. If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n Info\n     Defines class MyDaemon with attribute(s) and method(s).\n     Set an operation for Daemon process.\n'''\n\nimport sys\nfrom time import sleep\n\ntry:\n    from daemonpy import Daemon\nexcept ImportError as ats_error:\n    MESSAGE = '\\n{0}\\n{1}\\n'.format(__file__, ats_error)\n    sys.exit(MESSAGE)  # Force close python ATS ##############################\n\n\nclass MyDaemon(Daemon):\n    '''\n        Defines class MyDaemon with attribute(s) and method(s).\n        Set an operation for Daemon process.\n        It defines:\n\n            :attributes:\n                | None\n            :methods:\n                | run - run Daemon process (defined method).\n    '''\n\n    def run(self):\n        '''\n            Run Daemon process with time sleep example.\n\n            :exceptions: None\n        '''\n        while True:\n            sleep(1)\n\nif __name__ == '__main__':\n    DAEMON = MyDaemon('/tmp/daemon-example.pid')\n    DAEMON.usage(sys.argv[1])\n```\n\n### Dependencies\n\nThese modules requires other modules and libraries\n* [daemonpy - Python App/Tool/Script Utilities](https://pypi.org/project/daemonpy/)\n\n### Package structure\n\n**daemonpy** is based on OOP.\n\nPackage structure\n\n```bash\n    daemonpy/\n       ├── daemon_usage.py\n       ├── file_descriptor.py\n       ├── file_process_id.py\n       ├── __init__.py\n       ├── py.typed\n       └── unix_operations.py\n    \n    1 directory, 6 files\n```\n\n### Docs\n\n[![Documentation Status](https://readthedocs.org/projects/daemonpy/badge/?version=latest)](https://daemonpy.readthedocs.io/en/latest/?badge=latest)\n\nMore documentation and info at\n\n* [daemonpy.readthedocs.io](https://daemonpy.readthedocs.io)\n* [www.python.org](https://www.python.org/)\n\n### Contributing\n\n[Contributing to daemonpy](CONTRIBUTING.md)\n\n### Copyright and licence\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nCopyright (C) 2020 - 2024 by [vroncevic.github.io/daemonpy](https://vroncevic.github.io/daemonpy/)\n\n**daemonpy** is free software; you can redistribute it and/or modify\nit under the same terms as Python itself, either Python version 2.x/3.x or,\nat your option, any later version of Python 3 you may have available.\n\nLets help and support PSF.\n\n[![Python Software Foundation](https://raw.githubusercontent.com/vroncevic/daemonpy/dev/docs/psf-logo-alpha.png)](https://www.python.org/psf/)\n\n[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.python.org/psf/donations/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvroncevic%2Fdaemonpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvroncevic%2Fdaemonpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvroncevic%2Fdaemonpy/lists"}