Skip to main content

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.

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)

Table of built distributions (wheels) for argapp 0.7.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.7.2 This release

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.0

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page