Skip to main content

A Python package for CLI application development

Project description

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.
    • Arg represents optional and positional arguments, with the most essential use cases covered.
    • App represents a main command or a subcommand.
    • The fields are validated upon construction or setting, raising an Exception in 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_OK comment to the script.
    • Specific completions are added automatically.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

argapp-0.7.2-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file argapp-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: argapp-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for argapp-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 333212920a3bc30e60100be1c31cdae7077623b92eba26b551d45fa0f980f8a4
MD5 4578d00a29d829db4a6be6faa007e52e
BLAKE2b-256 0b32e32e5faa66b88152d6704d2047f9176223db0150901cbce19680ab6a76e0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page