{"id":13813883,"url":"https://github.com/torfsen/service","last_synced_at":"2025-07-30T04:10:18.697Z","repository":{"id":25584862,"uuid":"29019020","full_name":"torfsen/service","owner":"torfsen","description":"Easy implementation of Unix background services in Python","archived":false,"fork":false,"pushed_at":"2022-12-08T05:02:27.000Z","size":97,"stargazers_count":59,"open_issues_count":10,"forks_count":14,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-03T19:48:46.855Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://python-service.readthedocs.org","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/torfsen.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","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":"2015-01-09T14:13:20.000Z","updated_at":"2025-04-29T02:05:02.000Z","dependencies_parsed_at":"2023-01-14T02:59:36.412Z","dependency_job_id":null,"html_url":"https://github.com/torfsen/service","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/torfsen/service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torfsen%2Fservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torfsen%2Fservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torfsen%2Fservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torfsen%2Fservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/torfsen","download_url":"https://codeload.github.com/torfsen/service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torfsen%2Fservice/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267808216,"owners_count":24147388,"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-07-30T02:00:09.044Z","response_time":70,"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":[],"created_at":"2024-08-04T04:01:34.376Z","updated_at":"2025-07-30T04:10:18.650Z","avatar_url":"https://github.com/torfsen.png","language":"Python","funding_links":[],"categories":["Topics","Python"],"sub_categories":["OS"],"readme":"Python background services made easy\n####################################\n\n.. image:: https://travis-ci.org/torfsen/service.svg?branch=master\n   :target: https://travis-ci.org/torfsen/service\n\nThe Python ``service`` package makes it easy to write Unix *services*, i.e.\nbackground processes (\"daemons\") that are controlled by a foreground\napplication (e.g. a console script)::\n\n    from service import Service\n\n    class MyService(Service):\n        def run(self):\n            while True:\n                do_work()\n\n    if __name__ == '__main__':\n        import sys\n\n        if len(sys.argv) != 2:\n            sys.exit('Syntax: %s COMMAND' % sys.argv[0])\n\n        cmd = sys.argv[1].lower()\n        service = MyService('my_service', pid_dir='/tmp')\n\n        if cmd == 'start':\n            service.start()\n        elif cmd == 'stop':\n            service.stop()\n        elif cmd == 'status':\n            if service.is_running():\n                print \"Service is running.\"\n            else:\n                print \"Service is not running.\"\n        else:\n            sys.exit('Unknown command \"%s\".' % cmd)\n\nFor details, please see the documentation_.\n\n.. _documentation: http://python-service.readthedocs.org/\n\n\nInstallation\n============\nInstallation is easy via pip_::\n\n    pip install service\n\n.. _pip: https://pip.pypa.io/en/latest/index.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorfsen%2Fservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftorfsen%2Fservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorfsen%2Fservice/lists"}