{"id":20058649,"url":"https://github.com/roboflow/template-python","last_synced_at":"2026-03-17T17:04:17.116Z","repository":{"id":87995442,"uuid":"522863560","full_name":"roboflow/template-python","owner":"roboflow","description":"A template repo holding our common setup for a python project","archived":false,"fork":false,"pushed_at":"2026-01-08T17:32:59.000Z","size":40,"stargazers_count":127,"open_issues_count":2,"forks_count":25,"subscribers_count":17,"default_branch":"main","last_synced_at":"2026-02-12T01:50:52.933Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roboflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-08-09T08:24:05.000Z","updated_at":"2026-02-10T08:18:29.000Z","dependencies_parsed_at":"2023-05-22T07:15:11.315Z","dependency_job_id":null,"html_url":"https://github.com/roboflow/template-python","commit_stats":null,"previous_names":[],"tags_count":4,"template":true,"template_full_name":null,"purl":"pkg:github/roboflow/template-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roboflow%2Ftemplate-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roboflow%2Ftemplate-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roboflow%2Ftemplate-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roboflow%2Ftemplate-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roboflow","download_url":"https://codeload.github.com/roboflow/template-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roboflow%2Ftemplate-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30627691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T14:16:03.965Z","status":"ssl_error","status_checked_at":"2026-03-17T14:16:03.380Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-11-13T13:02:46.157Z","updated_at":"2026-03-17T17:04:17.107Z","avatar_url":"https://github.com/roboflow.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Template 🐍\n\nA template repo holding Roboflow's common setup for a python project.\n\n## Installation\n\nYou can install the package using pip\n\n```bash\npip install -e .\n```\n\nor for development\n\n```bash\npip install -e \".[dev]\"\n```\n\n## Structure\n\nThe project has the following structure\n\n```\n├── .github\n│   └── workflows\n│       └── test.yml # holds our github action config\n├── .gitignore\n├── README.md\n├── pyproject.toml\n├── src\n│   └── sandbox\n│       ├── __init__.py\n│       └── hello.py\n└── test\n    └── test_hello.py\n```\n\n### Code Quality 🧹\n\nWe use `pre-commit` to ensure code quality. You can install it using:\n\n```bash\npre-commit install\n```\n\nYou can run the checks manually on all files:\n\n```bash\npre-commit run --all-files\n```\n\nWe now use **mypy** for type checking. Type hints are enforced and checked automatically via pre-commit hooks.\n\n### Tests 🧪\n\n[`pytest`](https://docs.pytest.org/en/7.1.x/) is used to run our tests.\n\n```bash\npytest . -v\n```\n\n### Publish on PyPi 🚀\n\n**Important**: Before publishing, edit `__version__` in [src/sandbox/__init__.py](/src/sandbox/__init__.py) to match the wanted new version.\n\nWe use [`twine`](https://twine.readthedocs.io/en/stable/) to upload our package.\n\n```bash\n# Build the package\npython3 -m build\n\n# Upload to TestPyPI (to verify everything is correct)\n# Note: For TestPyPI you need to use your TestPyPI credentials\ntwine upload -r testpypi dist/* --verbose\n\n# Upload to PyPI\ntwine upload dist/* --verbose\n```\n\n**Note**: For authentication, we recommend using [API tokens](https://pypi.org/help/#apitoken). Set `TWINE_USERNAME` to `__token__` and `TWINE_PASSWORD` to your token value.\n\n### CI/CD 🤖\n\nWe use [GitHub actions](https://github.com/features/actions) to automatically run tests and check code quality when a new PR is done on `main`.\n\nOn any pull request, we will check the code quality and tests.\n\nWhen a new release is created, we will try to push the new code to PyPi. We use [`twine`](https://twine.readthedocs.io/en/stable/) to make our life easier.\n\nThe **correct steps** to create a new release are the following:\n\n- edit `__version__` in [src/sandbox/__init__.py](/src/sandbox/__init__.py) to match the wanted new version.\n- create a new [`tag`](https://git-scm.com/docs/git-tag) with the release name, e.g. `git tag v0.0.1 \u0026\u0026 git push origin v0.0.1` or from the GitHub UI.\n- create a new release from GitHub UI\n\nThe CI will run when you create the new release.\n\n# Q\u0026A\n\n## Why no cookiecutter?\n\nThis is a template repo, it's meant to be used inside GitHub upon repo creation.\n\n## Why reinvent the wheel?\n\nThere are several very good templates on GitHub, I prefer to use code we wrote instead of blinding taking the most starred template and having features we don't need. From experience, it's better to keep it simple and general enough for our specific use cases.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froboflow%2Ftemplate-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froboflow%2Ftemplate-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froboflow%2Ftemplate-python/lists"}