{"id":15019129,"url":"https://github.com/thesharp/daemonize","last_synced_at":"2025-04-08T01:36:52.893Z","repository":{"id":2727290,"uuid":"3722317","full_name":"thesharp/daemonize","owner":"thesharp","description":"daemonize is a library for writing system daemons in Python.","archived":false,"fork":false,"pushed_at":"2019-12-09T10:55:31.000Z","size":93,"stargazers_count":448,"open_issues_count":20,"forks_count":65,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-01T00:34:37.647Z","etag":null,"topics":["daemon","daemonize","freebsd","linux","netbsd","openbsd","osx","python","stable","system"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thesharp.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-14T21:03:20.000Z","updated_at":"2025-03-04T12:48:58.000Z","dependencies_parsed_at":"2022-08-18T18:11:50.925Z","dependency_job_id":null,"html_url":"https://github.com/thesharp/daemonize","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesharp%2Fdaemonize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesharp%2Fdaemonize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesharp%2Fdaemonize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesharp%2Fdaemonize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thesharp","download_url":"https://codeload.github.com/thesharp/daemonize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247761051,"owners_count":20991531,"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","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":["daemon","daemonize","freebsd","linux","netbsd","openbsd","osx","python","stable","system"],"created_at":"2024-09-24T19:53:02.012Z","updated_at":"2025-04-08T01:36:52.873Z","avatar_url":"https://github.com/thesharp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"daemonize\n========================\n\n\n.. image:: https://readthedocs.org/projects/daemonize/badge/?version=latest\n    :target: http://daemonize.readthedocs.org/en/latest/?badge=latest\n    :alt: Latest version\n\n.. image:: https://img.shields.io/travis/thesharp/daemonize.svg\n    :target: http://travis-ci.org/thesharp/daemonize\n    :alt: Travis CI\n\n.. image:: https://img.shields.io/pypi/dm/daemonize.svg\n    :target: https://pypi.python.org/pypi/daemonize\n    :alt: PyPI montly downloads\n\n.. image:: https://img.shields.io/pypi/v/daemonize.svg\n    :target: https://pypi.python.org/pypi/daemonize\n    :alt: PyPI last version available\n\n.. image:: https://img.shields.io/pypi/l/daemonize.svg\n    :target: https://pypi.python.org/pypi/daemonize\n    :alt: PyPI license\n\n\n**daemonize** is a library for writing system daemons in Python. It is\ndistributed under MIT license. Latest version can be downloaded from\n`PyPI \u003chttps://pypi.python.org/pypi/daemonize\u003e`__. Full documentation can\nbe found at\n`ReadTheDocs \u003chttp://daemonize.readthedocs.org/en/latest/?badge=latest\u003e`__.\n\nDependencies\n------------\n\nIt is tested under following Python versions:\n\n-  2.6\n-  2.7\n-  3.3\n-  3.4\n-  3.5\n\nInstallation\n------------\n\nYou can install it from Python Package Index (PyPI):\n\n::\n\n    $ pip install daemonize\n\nUsage\n-----\n\n.. code-block:: python\n\n    from time import sleep\n    from daemonize import Daemonize\n\n    pid = \"/tmp/test.pid\"\n\n\n    def main():\n        while True:\n            sleep(5)\n\n    daemon = Daemonize(app=\"test_app\", pid=pid, action=main)\n    daemon.start()\n\nFile descriptors\n----------------\n\nDaemonize object's constructor understands the optional argument\n**keep\\_fds** which contains a list of FDs which should not be closed.\nFor example:\n\n.. code-block:: python\n\n    import logging\n    from daemonize import Daemonize\n\n    pid = \"/tmp/test.pid\"\n    logger = logging.getLogger(__name__)\n    logger.setLevel(logging.DEBUG)\n    logger.propagate = False\n    fh = logging.FileHandler(\"/tmp/test.log\", \"w\")\n    fh.setLevel(logging.DEBUG)\n    logger.addHandler(fh)\n    keep_fds = [fh.stream.fileno()]\n\n\n    def main():\n        logger.debug(\"Test\")\n\n    daemon = Daemonize(app=\"test_app\", pid=pid, action=main, keep_fds=keep_fds)\n    daemon.start()\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesharp%2Fdaemonize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesharp%2Fdaemonize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesharp%2Fdaemonize/lists"}