{"id":26577974,"url":"https://github.com/kitswas/python-template","last_synced_at":"2026-04-19T17:01:54.453Z","repository":{"id":283792200,"uuid":"952913697","full_name":"kitswas/python-template","owner":"kitswas","description":"A minimal template for Python projects.","archived":false,"fork":false,"pushed_at":"2025-04-18T15:52:55.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-18T20:47:49.663Z","etag":null,"topics":["machine-learning","ml","poetry-python","python","template","uv"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kitswas.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-22T06:12:39.000Z","updated_at":"2025-04-18T15:52:59.000Z","dependencies_parsed_at":"2025-04-18T08:27:54.435Z","dependency_job_id":"22b34533-167c-440f-a2f9-722004141f1e","html_url":"https://github.com/kitswas/python-template","commit_stats":null,"previous_names":["kitswas/python-template"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/kitswas/python-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitswas%2Fpython-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitswas%2Fpython-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitswas%2Fpython-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitswas%2Fpython-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kitswas","download_url":"https://codeload.github.com/kitswas/python-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitswas%2Fpython-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269842866,"owners_count":24484106,"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-11T02:00:10.019Z","response_time":75,"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":["machine-learning","ml","poetry-python","python","template","uv"],"created_at":"2025-03-23T04:18:16.991Z","updated_at":"2026-04-19T17:01:54.435Z","avatar_url":"https://github.com/kitswas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-template\n\nA template for Python projects.  \nIncludes basic project structure, a test suite, doc generation, a code formatter and linter, and a dependency manager.\n\n## How to use\n\nYou need the uv package/project manager to install the dependencies.  \nYou can get [uv here](https://docs.astral.sh/uv/getting-started/installation/).\n\n\u003e [!NOTE]\n\u003e To change the Python version, change the `requires-python` field in [pyproject.toml](pyproject.toml)\n\u003e and the number in [.python-version](.python-version).  \n\u003e uv will take care of the rest.\n\n**Remember to replace the placeholders in the [pyproject.toml](pyproject.toml) file and change/remove the LICENSE file.**\n\nSet up the environment. (Only once)\n\n```bash\nuv venv\n# .venv/Scripts/activate # Windows\nsource .venv/bin/activate # Linux/MacOS\nuv sync --link-mode=symlink # Install the dependencies, use -U to update\n```\n\nIf you want Pytorch (with or without CUDA), you can install it using the `--extra` flag.\n\n```bash\nuv sync --link-mode=symlink --extra=torch-cpu   # for CPU only\nuv sync --link-mode=symlink --extra=torch-cu128 # for CUDA support\n```\n\nYou can add other dependencies use `uv add`. The following example adds a valid kernel for Jupyter notebooks in VSCode.\n\n```bash\nuv add ipykernel # Similar to pip install ipykernel\n```\n\nTo run any script, append `uv run` before the `python` command. (If the environment is inactive)\n\n```bash\nuv run python src/hello.py\n```\n\nGet rid of temporary files: (Use with caution)\n\n```bash\ngit clean -fdX -n # Remove the -n flag to actually delete the files\n```\n\n## Testing and Documentation\n\nRun tests:\n\n```bash\nuv run python -m unittest discover\n```\n\nSee API documentation generated by [pdoc](https://pdoc.dev/) for any package:\n\n```bash\nuv run pdoc src # -o docs to output to a folder instead of opening in a browser\n```\n\n## Code Formatting and Linting\n\nWe have [ruff](https://docs.astral.sh/ruff/) for code formatting and linting.\nInstall the [VSCode extension](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)\nand enable `Format on Save` for a better experience.\n\nTo fix imports:\n\n```bash\nuv run ruff check --select I --fix # Sort imports\nuv run ruff check --select F401 --fix # Remove unused imports\n```\n\nTo check for linting errors:\n\n```bash\nuv run ruff check # Use --fix to fix the errors\n```\n\nTo format the code:\n\n```bash\nuv run ruff format\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitswas%2Fpython-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitswas%2Fpython-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitswas%2Fpython-template/lists"}