Name | python-cli-app-template JSON |
Version |
0.3.0
JSON |
| download |
home_page | None |
Summary | Python CLI app template project featuring the modern and extensible Python project manager hatch. |
upload_time | 2024-09-21 23:28:22 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | MIT |
keywords |
hatch
typer
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# python-cli-app-template
Boilerplate for Python CLI utility project.
## Features
* Uses [Hatch] - modern PEP-compliant project manager
* Uses [Typer] framework for managing CLI commands
* Uses [Dynaconf] for flexible management of configurations
## Usage
```bash
pca --help
```
## Development
To set up [hatch] and [pre-commit] for the first time:
1. install [hatch] globally, e.g. with [pipx] or brew, i.e. `pipx install hatch`,
2. make sure [pre-commit] is installed globally, e.g. with `pipx install pre-commit`.
A special feature that makes hatch very different from other familiar tools is that you almost never
activate, or enter, an environment. Instead, you use `hatch run env_name:command` and the `default` environment
is assumed for a command if there is no colon found. Thus you must always define your environment in a declarative
way and hatch makes sure that the environment reflects your declaration by updating it whenever you issue
a `hatch run ...`. This helps with reproducability and avoids forgetting to specify dependencies since the
hatch workflow is to specify everything directly in [pyproject.toml]. Only in rare cases, you
will use `hatch shell` to enter the `default` environment, which is similar to what you may know from other tools.
To get you started, use `hatch run test:cov` or `hatch run test:no-cov` to run the unitest with or without coverage reports,
respectively. Use `hatch run lint:all` to run all kinds of typing and linting checks. Try to automatically fix linting
problems with `hatch run lint:fix` and use `hatch run docs:serve` to build and serve your documentation.
You can also easily define your own environments and commands. Check out the environment setup of hatch
in [pyproject.toml] for more commands as well as the package, build and tool configuration.
The environments defined by hatch are configured to generate lock files using [hatch-pip-compile] under `locks`.
To upgrade all packages in an environment like `test`, just run `hatch run test:upgrade-all`. To upgrade specific
packages, type `hatch run test:upgrade-pkg pkg1,pkg2`.
## Credits
This package was created with [The Hatchlor] project template.
[The Hatchlor]: https://github.com/florianwilhelm/the-hatchlor
[Typer]: https://typer.tiangolo.com/
[dynaconf]: https://www.dynaconf.com/
[pipx]: https://pypa.github.io/pipx/
[hatch]: https://hatch.pypa.io/
[pre-commit]: https://pre-commit.com/
[hatch-pip-compile]: https://github.com/juftin/hatch-pip-compile
[pyproject.toml]: https://github.com/turboBasic/python-cli-app-template/blob/main/pyproject.toml
Raw data
{
"_id": null,
"home_page": null,
"name": "python-cli-app-template",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "hatch, typer",
"author": null,
"author_email": "Andrii Melnyk \u26a1\ufe0f <andrii7melnyk@proton.me>",
"download_url": "https://files.pythonhosted.org/packages/fb/07/4350c3c528b2bfcce31c362a19e73c5a36a7207e131fa6c9eb3757412ec4/python_cli_app_template-0.3.0.tar.gz",
"platform": null,
"description": "# python-cli-app-template\n\nBoilerplate for Python CLI utility project.\n\n## Features\n\n* Uses [Hatch] - modern PEP-compliant project manager\n* Uses [Typer] framework for managing CLI commands\n* Uses [Dynaconf] for flexible management of configurations\n\n## Usage\n\n```bash\npca --help\n```\n\n## Development\n\nTo set up [hatch] and [pre-commit] for the first time:\n\n1. install [hatch] globally, e.g. with [pipx] or brew, i.e. `pipx install hatch`,\n2. make sure [pre-commit] is installed globally, e.g. with `pipx install pre-commit`.\n\nA special feature that makes hatch very different from other familiar tools is that you almost never\nactivate, or enter, an environment. Instead, you use `hatch run env_name:command` and the `default` environment\nis assumed for a command if there is no colon found. Thus you must always define your environment in a declarative\nway and hatch makes sure that the environment reflects your declaration by updating it whenever you issue\na `hatch run ...`. This helps with reproducability and avoids forgetting to specify dependencies since the\nhatch workflow is to specify everything directly in [pyproject.toml]. Only in rare cases, you\nwill use `hatch shell` to enter the `default` environment, which is similar to what you may know from other tools.\n\nTo get you started, use `hatch run test:cov` or `hatch run test:no-cov` to run the unitest with or without coverage reports,\nrespectively. Use `hatch run lint:all` to run all kinds of typing and linting checks. Try to automatically fix linting\nproblems with `hatch run lint:fix` and use `hatch run docs:serve` to build and serve your documentation.\nYou can also easily define your own environments and commands. Check out the environment setup of hatch\nin [pyproject.toml] for more commands as well as the package, build and tool configuration.\n\nThe environments defined by hatch are configured to generate lock files using [hatch-pip-compile] under `locks`.\nTo upgrade all packages in an environment like `test`, just run `hatch run test:upgrade-all`. To upgrade specific\npackages, type `hatch run test:upgrade-pkg pkg1,pkg2`.\n\n## Credits\n\nThis package was created with [The Hatchlor] project template.\n\n[The Hatchlor]: https://github.com/florianwilhelm/the-hatchlor\n[Typer]: https://typer.tiangolo.com/\n[dynaconf]: https://www.dynaconf.com/\n[pipx]: https://pypa.github.io/pipx/\n[hatch]: https://hatch.pypa.io/\n[pre-commit]: https://pre-commit.com/\n[hatch-pip-compile]: https://github.com/juftin/hatch-pip-compile\n[pyproject.toml]: https://github.com/turboBasic/python-cli-app-template/blob/main/pyproject.toml\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python CLI app template project featuring the modern and extensible Python project manager hatch.",
"version": "0.3.0",
"project_urls": {
"Documentation": "https://turbobasic.github.io/python-cli-app-template",
"Source": "https://github.com/turboBasic/python-cli-app-template",
"Tracker": "https://github.com/turboBasic/python-cli-app-template/issues"
},
"split_keywords": [
"hatch",
" typer"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6176205e182f8181bd45e08431e62446402ac03a057eb3166a419a2d4f304b5d",
"md5": "0701b6cdacd84bb3b55ce3902cc0a829",
"sha256": "19eb319926cb53bddf3e6232647325fda0136860630b80722bbbf0859247cbe1"
},
"downloads": -1,
"filename": "python_cli_app_template-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0701b6cdacd84bb3b55ce3902cc0a829",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 9214,
"upload_time": "2024-09-21T23:28:21",
"upload_time_iso_8601": "2024-09-21T23:28:21.270085Z",
"url": "https://files.pythonhosted.org/packages/61/76/205e182f8181bd45e08431e62446402ac03a057eb3166a419a2d4f304b5d/python_cli_app_template-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fb074350c3c528b2bfcce31c362a19e73c5a36a7207e131fa6c9eb3757412ec4",
"md5": "00322888dc25b6847cc08158a4b06acd",
"sha256": "e16ed5db2e30998a60128f97552f2fc79c597a7dba5538bf4f14384524d764f0"
},
"downloads": -1,
"filename": "python_cli_app_template-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "00322888dc25b6847cc08158a4b06acd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 7982,
"upload_time": "2024-09-21T23:28:22",
"upload_time_iso_8601": "2024-09-21T23:28:22.453256Z",
"url": "https://files.pythonhosted.org/packages/fb/07/4350c3c528b2bfcce31c362a19e73c5a36a7207e131fa6c9eb3757412ec4/python_cli_app_template-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-21 23:28:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "turboBasic",
"github_project": "python-cli-app-template",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "python-cli-app-template"
}