{"id":18717945,"url":"https://github.com/nibblepoker/template-python-worker-app","last_synced_at":"2025-08-22T05:04:31.873Z","repository":{"id":212873106,"uuid":"732493504","full_name":"NibblePoker/Template-Python-Worker-App","owner":"NibblePoker","description":"Template for a threaded worker-based applications in Python.","archived":false,"fork":false,"pushed_at":"2023-12-16T22:33:52.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T14:01:19.502Z","etag":null,"topics":["docker","python","worker-threads"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NibblePoker.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-CC0","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-16T21:20:12.000Z","updated_at":"2023-12-16T22:35:19.000Z","dependencies_parsed_at":"2023-12-17T00:03:14.856Z","dependency_job_id":null,"html_url":"https://github.com/NibblePoker/Template-Python-Worker-App","commit_stats":null,"previous_names":["nibblepoker/template-python-worker-app"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/NibblePoker/Template-Python-Worker-App","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NibblePoker%2FTemplate-Python-Worker-App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NibblePoker%2FTemplate-Python-Worker-App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NibblePoker%2FTemplate-Python-Worker-App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NibblePoker%2FTemplate-Python-Worker-App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NibblePoker","download_url":"https://codeload.github.com/NibblePoker/Template-Python-Worker-App/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NibblePoker%2FTemplate-Python-Worker-App/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271588743,"owners_count":24785751,"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-22T02:00:08.480Z","response_time":65,"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":["docker","python","worker-threads"],"created_at":"2024-11-07T13:18:36.805Z","updated_at":"2025-08-22T05:04:31.849Z","avatar_url":"https://github.com/NibblePoker.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NibblePoker's Python Worker App Template\nTemplate for a simple threaded worker-based applications in Python.\n\nThis template has successfully been used internally for \"[nibblepoker.lu](https://nibblepoker.lu)\" since 2021\nand has finally been made public for easier referencing and usage in future projects.\n\nThe whole demo totals at around 300 LoC and is quite easy to modify.\u003cbr\u003e\nIt can also be taken appart and re-incorporated in other project freely due to the very permissive license.\n\n\n## Customization\n\n### Application's Name\nThe application's name can be changed in '[app/app.py](app/app.py)', and you just need to adapt the following lines:\n```python\n# \u003e Printing the logs header\nprint_header(logger, \"My App\")\n```\n\n### Workers\nWorkers are simple objects that extend a common class and point to a thread's main function.\n\nA short example can be found in '[app/my_app/workers/example.py](app/my_app/workers/example.py)'.\n\nIf you want to add your own, you just need to edit the following lines in '[app/app.py](app/app.py)' to include your own.\n```python\n# \u003e Preparing workers.\nlogger.info(\"Preparing workers...\")\nworkers: list[Worker] = list()\nworkers.append(create_example_worker(\n    config=config,\n    name_suffix=\"demo\",\n    sleep_count=5,\n    sleep_length_ms=750,\n))\n```\n\n\n## Usage\n\n### Any Host\n```shell\ncd app/\npython ./app.py\n```\n\n### Docker-compose\n```shell\ndocker-compose up --build -d\n```\n\n\n## Licenses\nThis project is dual-licensed under the following open-source licenses.\u003cbr\u003e\nYou can choose the one that best suits your needs:\n1. [MIT License](LICENSE-MIT)\u003cbr\u003e\n   \u0026nbsp;\u0026nbsp;● Just include the `LICENSE-MIT` file and be done with it while using an OSI license.\n\n2. [CC0 1.0 Universal (CC0 1.0) (Public Domain)](LICENSE-CC0)\u003cbr\u003e\n   \u0026nbsp;\u0026nbsp;● Do whatever you want with it.\u003cbr\u003e\n   \u0026nbsp;\u0026nbsp;● No credit, mentions or anything else is needed.\u003cbr\u003e\n   \u0026nbsp;\u0026nbsp;● Just have fun programming :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnibblepoker%2Ftemplate-python-worker-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnibblepoker%2Ftemplate-python-worker-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnibblepoker%2Ftemplate-python-worker-app/lists"}