{"id":20852400,"url":"https://github.com/ryouze/py-template","last_synced_at":"2025-07-16T09:36:18.946Z","repository":{"id":261478369,"uuid":"884431127","full_name":"ryouze/py-template","owner":"ryouze","description":"Barebones Python project template (poetry + pytest).","archived":false,"fork":false,"pushed_at":"2025-06-05T22:12:14.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T23:19:24.287Z","etag":null,"topics":["poetry-python","pytest","python","python-template","template","unlicense"],"latest_commit_sha":null,"homepage":"https://ryouze.net/","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/ryouze.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":"2024-11-06T18:31:16.000Z","updated_at":"2025-06-05T22:12:16.000Z","dependencies_parsed_at":"2024-11-06T19:39:55.699Z","dependency_job_id":"d507cf3d-7203-43f2-8480-1e96634c6ee1","html_url":"https://github.com/ryouze/py-template","commit_stats":null,"previous_names":["ryouze/py-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryouze/py-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryouze%2Fpy-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryouze%2Fpy-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryouze%2Fpy-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryouze%2Fpy-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryouze","download_url":"https://codeload.github.com/ryouze/py-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryouze%2Fpy-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265500291,"owners_count":23777456,"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":["poetry-python","pytest","python","python-template","template","unlicense"],"created_at":"2024-11-18T03:17:32.635Z","updated_at":"2025-07-16T09:36:18.933Z","avatar_url":"https://github.com/ryouze.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e ## About this template\n\u003e\n\u003e A minimal Python project template built around Poetry.\n\u003e\n\u003e Features:\n\u003e\n\u003e * Poetry for dependency management, and pytest for testing.\n\u003e * CI pipeline using GitHub Actions.\n\u003e * Unlicense by default for unrestricted reuse (no attribution required).\n\u003e\n\u003e Follow these steps to set it up for your own project.\n\u003e\n\u003e ### 1. Choose a license\n\u003e\n\u003e Tip: The repository uses the Unlicense by default, but the text mentions MIT because most of my projects use MIT.\n\u003e Replace the `LICENSE` file (at the root of this repository) with MIT, Apache-2.0, BSD-3, or any other license you prefer.\n\u003e\n\u003e ### 2. Choose a project name\n\u003e\n\u003e You’ll need two forms of the project name:\n\u003e\n\u003e * `your_project` - the import/package name\n\u003e * `your-project` - the distribution name\n\u003e\n\u003e Replace the following placeholders:\n\u003e\n\u003e * Rename the `py_template/` directory to `your_project/` (at the root of this repository).\n\u003e * Search and replace `py_template` with `your_project` (in all files).\n\u003e * Search and replace `py-template` with `your-project` (in all files).\n\u003e * Search and replace `ryouze` with your GitHub username (in all files).\n\u003e\n\u003e ### 3. Update metadata\n\u003e\n\u003e Edit `pyproject.toml` and update the following fields:\n\u003e\n\u003e * `license` - your chosen license.\n\u003e * `description` - same short description as in the README.\n\u003e * `authors` - your name and email.\n\u003e * `license` - keep `license = { file = \"LICENSE\" }`, or use `license = \"MIT\"` (or another SPDX identifier) for cleaner PyPI classification.\n\u003e\n\u003e ### 4. Remove unnecessary files\n\u003e\n\u003e Delete `poetry.lock` so that it gets regenerated with your dependencies on the next `poetry install`.\n\u003e Also remove this section from the README.\n\u003e\n\u003e ### 5. Bumping the version\n\u003e\n\u003e Use `bump_version.sh` to bump the version number in `pyproject.toml` and create a Git tag.\n\n\n# py-template\n\n[![CI](https://github.com/ryouze/py-template/actions/workflows/ci.yml/badge.svg)](https://github.com/ryouze/py-template/actions/workflows/ci.yml)\n\npy-template is a barebones Python project template.\n\n\n## Motivation\n\nText here.\n\n\n## Features\n\n- Written in modern Python (Python 3.12+).\n- Comprehensive documentation with docstrings.\n- Strict static typing.\n\n\n## Tested Systems\n\nThis project has been tested on the following systems:\n\n- macOS 15.3 (Sequoia)\n\u003c!-- - Manjaro 24.0 (Wynsdey)\n- Windows 11 23H2 --\u003e\n\nAutomated testing is also performed on the latest version of GNU/Linux (Python 3.12-3.13) using GitHub Actions.\n\n\n## Requirements\n\nTo run this project, you'll need:\n\n- Python 3.12 or higher\n- [Poetry](https://python-poetry.org/) (optional and only for developers)\n\n\n## Setup\n\n### Pipx (Recommended for Users)\n\nIf you just want to run the app, the recommended method is to install it with [pipx](https://github.com/pypa/pipx). This allows you to run the app from any directory, enables easy updates, and keeps it isolated from other Python packages. Poetry is *not* required for this installation method.\n\nTo install the app with `pipx`, run:\n\n```sh\npipx install git+https://github.com/ryouze/py-template.git\n```\n\nTo update to the latest version, run:\n\n```sh\npipx upgrade py-template\n```\n\nOnce installed, refer to the [Usage](#usage) section.\n\n\n### Poetry or pip (Recommended for Developers)\n\nFollow these steps to set up the project:\n\n1. **Clone the repository**:\n\n    ```sh\n    git clone https://github.com/ryouze/py-template.git\n    ```\n\n2. **Install the project**:\n\n    ```sh\n    cd py-template\n    ```\n\n    **Option 1 - Poetry**:\n\n    \u003c!--\n    Groups:\n    * '--without dev' installs every non-optional group except 'dev'.\n    * '--only main' installs nothing except the implicit main group, so it will silently drop any future non-dev groups you might add (e.g., 'docs' or 'bench').\n    The Poetry maintainers recommend '--without dev' for a production install and '--only main' only when you know you want to strip out everything but the runtime set. However, since we set the 'dev' group as optional, 'poetry install' will only install the production dependencies by default, so you can skip the '--without dev' flag.\n    Virtual-environment activation:\n    The old 'poetry shell' command moved to a plugin. Thus, 'poetry env' activate is now the built-in way to enter the venv; it only prints the shell command.\n    Use 'eval $(poetry env activate)' for Bourne-like shells, 'eval (poetry env activate)' for Fish and 'Invoke-Expression (poetry env activate)' for PowerShell.\n    --\u003e\n\n    ```sh\n    poetry install\n    ```\n\n    **Option 2 - pip in editable mode**:\n\n    ```sh\n    python3 -m venv .env\n    source .env/bin/activate\n    pip install -e .\n    ```\n\n    This installs only the production dependencies. To install development dependencies as well, see the [Development and Testing](#development-and-testing) section.\n\n\n## Usage\n\n**a) If installed via pipx, you can run the app from any directory**:\n\n```sh\npy-template\n```\n\n**b) If installed via Poetry, there's no need to activate the virtual environment. Simply run this from the project directory**:\n\n```sh\npoetry run py-template\n```\n\nYou can still manually activate the virtual environment using `eval $(poetry env activate)` if needed.\n\n**c) If installed via pip in editable mode, activate the virtual environment first**:\n\n```sh\nsource .env/bin/activate\n```\n\nOr configure your terminal or IDE to automatically activate the virtual environment. For example, in VSCode, set `python.terminal.activateEnvInCurrentTerminal` to `true`.\n\nThen you can run the command directly:\n\n```sh\npy-template\n```\n\n\n## Development and Testing\n\nBy default, `poetry install` skips dev dependencies (e.g., `pytest`) because they're marked as `optional = true`.\n\nTo install all dependencies, including development ones, run:\n\n```sh\npoetry install --all-groups\n```\n\nOr `poetry install --with dev` to install only the `dev` group, but the `--all-groups` option is recommended to ensure all non-production dependencies are installed.\n\nTo run tests manually, use:\n\n```sh\npoetry run pytest -v\n```\n\n\n## Credits\n\n- [loguru](https://github.com/Delgan/loguru)\n- [pytest](https://github.com/pytest-dev/pytest)\n\n\n## Contributing\n\nAll contributions are welcome.\n\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryouze%2Fpy-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryouze%2Fpy-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryouze%2Fpy-template/lists"}