argapp - A Python package for CLI application development
Overview
argapp is an OOP wrapper for argparse and argcomplete:
- Allows writing CLI applications using OOP - encapsulates argparse API.
- Provides limited support for the shell completion via argcomplete.
Full documentation is available at https://deohayer.github.io/argapp-ws.
Features
- Offers several classes for CLI parsing via OOP.
Argrepresents optional and positional arguments, with the most essential use cases covered.Apprepresents a main command or a subcommand.- The fields are validated upon construction or setting, raising an
Exceptionin case of any issues. - The parsing can be overridden by subclassing
Arg.
- Offers shell completion support if argcomplete is installed:
- The required API calls are already in place. It is only required to install argcomplete and add the
PYTHON_ARGCOMPLETE_OKcomment to the script. - Specific completions are added automatically.
- The required API calls are already in place. It is only required to install argcomplete and add the
Dependencies
- Linux
- Python 3
- 3.6
- 3.7
- 3.8
- 3.9
- 3.10
- 3.11
Installation
- The package can be installed globally by running:
pip3 install argapp
- The Git repository can be used directly. The repository layout is designed with exactly this use case in mind.
- For the argcomplete installation, please follow the official documentation.
Limitations
- No abbreviated optional arguments.
- No argument groups of any kind.
- No partial parsing.
argcomplete.autocomplete()call is hidden and cannot be parametrized.- The completion has no test coverage.
Metadata
Release files for argapp 0.7.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| argapp-0.7.2-py3-none-any.whl | Python 3 | none | any | Details |
Release files / argapp-0.7.2-py3-none-any.whl
| Download URL | argapp-0.7.2-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
333212920a3bc30e60100be1c31cdae7077623b92eba26b551d45fa0f980f8a4
|
|
BLAKE2b-256 checksum How to use checksums |
0b32e32e5faa66b88152d6704d2047f9176223db0150901cbce19680ab6a76e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|