{"id":26591600,"url":"https://github.com/tsvikas/python-template","last_synced_at":"2025-07-20T08:33:42.186Z","repository":{"id":281499256,"uuid":"649868045","full_name":"tsvikas/python-template","owner":"tsvikas","description":"A modern template for python package/app","archived":false,"fork":false,"pushed_at":"2025-06-23T16:45:36.000Z","size":432,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-03T18:57:55.628Z","etag":null,"topics":["python-template"],"latest_commit_sha":null,"homepage":"","language":"Jinja","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/tsvikas.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":"2023-06-05T20:18:29.000Z","updated_at":"2025-06-23T16:44:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9ac4f32-1298-475b-ae77-ec7aa7bf58a3","html_url":"https://github.com/tsvikas/python-template","commit_stats":null,"previous_names":["tsvikas/python-template"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/tsvikas/python-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsvikas%2Fpython-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsvikas%2Fpython-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsvikas%2Fpython-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsvikas%2Fpython-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsvikas","download_url":"https://codeload.github.com/tsvikas/python-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsvikas%2Fpython-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266092805,"owners_count":23875544,"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","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":["python-template"],"created_at":"2025-03-23T14:18:45.600Z","updated_at":"2025-07-20T08:33:42.161Z","avatar_url":"https://github.com/tsvikas.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Modern Python Project Template\n\n[![Copier](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-black.json)](https://github.com/copier-org/copier)\n[![Tests](https://github.com/tsvikas/python-template/actions/workflows/uv-tests.yml/badge.svg)](https://github.com/tsvikas/python-template/actions/workflows/uv-tests.yml)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n\nA modern Python project template using recommended development tools and best practices.\n\n![Concept image](assets/concept.jpg)\n\n## TL;DR\n\nAssuming that you have `uv` installed (version `\u003e=0.5.19`)\n\n1. `uvx --with copier_templates_extensions copier copy -r main --trust gh:tsvikas/python-template path/to/project/directory/`\n\n1. `cd path/to/project/directory/`\n\n1. `uvx --from rust-just just init`\n\nYou can shorten these steps if you install `copier` and `just`.\n\n## Features\n\nThis template uses the best development tools while staying simple and uncluttered.\nEverything is designed to be opt-in, so you can use only what you need and ignore the rest until necessary.\nSensible defaults for all included tools are provided.\n\n### Code Structure\n\n- Follows modern project layout following best practices\n- Optional: Command-line interface with [Typer](https://typer.tiangolo.com/)\n- Optional: Easy logging with [Loguru](https://loguru.readthedocs.io/)\n\n### Development Tools\n\n- Task automation with [Just](https://just.systems/man/en/) command runner\n- Python dependency management with [uv](https://docs.astral.sh/uv/) (faster alternative to pip/poetry)\n- Optional: Versioning management with [uv-dynamic-versioning](https://github.com/ninoseki/uv-dynamic-versioning)\n\n### Code Quality\n\n- Testing framework with [pytest](https://docs.pytest.org/)\n  - Coverage reports via [pytest-coverage](https://pytest-cov.readthedocs.io/)\n  - Performance benchmarking with [pytest-benchmark](https://pytest-benchmark.readthedocs.io/)\n  - Additional pytest plugins for a better testing experience\n- Code formatting with [Black](https://black.readthedocs.io/) or [Ruff formatter](https://docs.astral.sh/ruff/formatter/)\n- Documentation formatting with [blacken-docs](https://github.com/adamchainz/blacken-docs/)\n- Comprehensive linting with [Ruff](https://docs.astral.sh/ruff/)\n  - Replaces Flake8, isort, pyupgrade, yesqa, pycln, and dozens of plugins\n- Static type checking with [MyPy](https://mypy-lang.org/)\n- Curated `.gitignore` file\n- Formatting and linting run automatically on commit via [pre-commit](https://pre-commit.com/) hooks:\n  - [EditorConfig](https://editorconfig.org/) for consistent formatting across editors\n  - Spell checking with [codespell](https://github.com/codespell-project/codespell) and [typos](https://github.com/crate-ci/typos)\n  - Markdown formatting with [Mdformat](https://mdformat.readthedocs.io/)\n  - Validation for JSON, TOML, XML, and YAML files\n  - Linting for YAML, reStructuredText, and shell scripts\n  - Schema checking for `pyproject.toml` and GitHub configuration files\n\n### CI/CD Integration\n\n- Test automation with [GitHub Actions](https://docs.github.com/en/actions)\n- Dependency updates with [Dependabot](https://docs.github.com/en/code-security/dependabot)\n\n### Documentation (Coming Soon)\n\n- Documentation generation\n- Automatic API documentation\n\n## Getting Started\n\n### Prerequisites\n\n- **git**: Obviously.\n\n- **uv**: After the template is used, this is the only requirement for development.\n  Specifically, contributors to your project can use uv for building, testing, linting, and formatting.\n  See the [installation instructions](https://docs.astral.sh/uv/getting-started/installation/).\n\n- **Copier**: For the initial creation of the project from this template, and for pulling template updates,\n  you need [Copier](https://copier.readthedocs.io/)\n  with the [copier_templates_extensions](https://github.com/copier-org/copier-templates-extensions) package.\n  Install it with this command (requires uv):\n\n  ```bash\n  uv tool install copier --with copier_templates_extensions\n  ```\n\n- All the other developments tools are managed automatically by uv in your vertual environment,\n  ensuring consistent versions across developers\n  via Python's [dependency-groups](https://packaging.python.org/en/latest/specifications/dependency-groups/).\n\n- **just**: Optional but recommended for running tasks with `just \u003ctaskname\u003e` instead of `uv run just \u003ctaskname\u003e`.\n  See the [installation instructions](https://just.systems/man/en/packages.html), or just run `uv tool install rust-just`.\n\n- **gh**: GitHub CLI is not required to use this template, but it is recommended for interacting with GitHub.\n\n### Creating a New Project\n\n- Generate a new project with:\n\n```bash\ncopier copy --trust gh:tsvikas/python-template ~/path/to/project/directory/\n```\n\n- Follow the interactive questionnaire to customize your project.\n- from the project directory, run `just init` to initialize the project.\n\n### Developing Your Project\n\nAfter creating your project, run those commands from the project directory:\n\n- Run the test suite: `just test`\n- Run linting and formatting: `just lint` and `just format`, or `just check` to run them both.\n\nSee the generated `justfile` for all available commands.\n\n## Contributing\n\nI am excited to see this template being used.\nFeel free to suggest improvements or tell me about issues.\nContributions and Pull Requests are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsvikas%2Fpython-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsvikas%2Fpython-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsvikas%2Fpython-template/lists"}