{"id":14064944,"url":"https://github.com/drbartling/python_template","last_synced_at":"2026-01-17T10:43:41.548Z","repository":{"id":165720786,"uuid":"362551847","full_name":"drbartling/python_template","owner":"drbartling","description":"Template for starting a python tool project","archived":false,"fork":false,"pushed_at":"2023-03-13T04:50:07.000Z","size":110,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-04T03:35:11.681Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/drbartling.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-04-28T17:21:50.000Z","updated_at":"2024-04-02T22:35:53.000Z","dependencies_parsed_at":"2023-05-17T22:00:18.826Z","dependency_job_id":null,"html_url":"https://github.com/drbartling/python_template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/drbartling/python_template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drbartling%2Fpython_template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drbartling%2Fpython_template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drbartling%2Fpython_template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drbartling%2Fpython_template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drbartling","download_url":"https://codeload.github.com/drbartling/python_template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drbartling%2Fpython_template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267743683,"owners_count":24137672,"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-29T02:00:12.549Z","response_time":2574,"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-13T07:04:11.594Z","updated_at":"2026-01-17T10:43:41.537Z","avatar_url":"https://github.com/drbartling.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Python Template\n\nTemplate for a stand-alone python tool or script\n\n## About the Template\n\nReplace this section with \"About `project name`\"\n\nThis template sets up a python project using poetry to manage dependencies, pytest for unit testing, pyinstaller for building an executable, and wix for creating a windows installer for distribution.\n\n## Getting Started\n\n### Setup\n- Install the latest version of python\n\t- MacOS: `brew install python`\n\t- Windows: `winget install Python.Python.3.11`\n\t- Ubuntu: `sudo apt install python`\n- Install [poetry](https://python-poetry.org/)\n\t- [Installation Instructions](https://python-poetry.org/docs/#installation)\n- Install project dependencies:\n\t- `poetry install`\n- Activate project virtual environment:\n\t- `poetry shell`\n- Run the example program\n\t- `hello Bob`\n\n### Testing\n\n```bash\npytest\n```\n\n### Building Executable\n\n```bash\npython tools/app_build.py\n```\n\n### Building The Windows Installer\n\n- Install build dependencies\n\t- Windows: `winget install WixToolset.AdditionalTools`\n- Build the installer\n\t- `python tools/installer_build.py`\n\n## Using the Template\nModify the getting started section for your specific application.  Update the rest of the template mostly by searching for \"hello\" and replacing it with what's appropriate for your application.\n\n\t\tIn `tools/installer_build.py`, replace the `uuid.uuid4()` calls with a fixed [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) ([GUID](https://learn.microsoft.com/en-us/dotnet/api/system.guid?view=net-7.0)).\n\nChange this:\n```python\nf'-dupgrade_code=\"{uuid.uuid4()}\"',  # TODO: Hard code a permanent uuid\nf'-dpath_code=\"{uuid.uuid4()}\"',  # TODO: Hard code a permanent uuid\n```\nInto this:\n```python\n'-dupgrade_code=\"12345678-90ab-cdef-1234-567890abcdef\"',\n'-dpath_code=\"12345678-90ab-cdef-1234-567890abcdef\"',\n```\n\n## Template Goal\n\nMost people and organisations have figured out hot to implement the features customers are requesting.  But often \"doing things the right way\" is deferred until it becomes nearly impossible to ever do things the \"right way\".\n\nI want to make it easy to start a new project with tests, documentation, installers, etc.  Everything that makes it easier to get those features out the door and delivered relatively stress free.\n\nI don't think this template does that for a oython project, yet, but it puts a few things in place and will make it easier for people I know to start a new python project and deliver it to co-workers, customers, freinds, and family.\n\nHope it helps.\n\n## Feedback\nCreate issues or pull requests if you think there's a way to improve it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrbartling%2Fpython_template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrbartling%2Fpython_template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrbartling%2Fpython_template/lists"}