A python module to help create predictable command line tools for python >= 2.6 and 3.x
pycli_tools is a python module that wraps the ArgumentParser class from the build-in argparse module.
If you use it in your command line scripts you will get some defaults options added to your application such as –verbose and –quiet to control the verbosity of your application (using the python logging module).
Also there is the –config option that gives you the ability to read command line arguments from a configuration file to save users of your application a lot of typing (e.g. ~/.myapprc).
installation
The easiest way is to install using pip:
$ pip install pycli_tools
Read the documentation for alternative ways of installing.
usage
To create a myapp command that reads its default configuration from ~/.myapprc do this:
from pycli_tools.parsers import get_argparser
parser = get_argparser(prog='myapp', default_config='~/.myapprc')
parser.add_argument('--database')
parser.add_argument('file')
args = parser.parse_args()
The file ~/.myapprc can contain the following:
[myapp]
database = /some/path/to/my/database.sqlite
Read the documentation to see how to use pycli_tools.
documentation
Read the full documentation here.
Metadata
Release files for pycli_tools 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pycli_tools-2.0.2.tar.gz | 7.0 kB | Without provenance | Details |
Release files / pycli_tools-2.0.2.tar.gz
| Download URL | pycli_tools-2.0.2.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ffafa63d24969510b16d5861ea01572b06de2531751f9b59237054c7c8b3e5b
|
|
BLAKE2b-256 checksum How to use checksums |
78ef9a4133c6625d844f53fa7a9a2945a800dd1eebc551831f0b90373bae555b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pycli_tools 2.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.