quota_notifier.cli

The application commandline interface.

This module defines the application’s command line interface and serves as the primary entrypoint for executing the parent package. It is responsible for parsing arguments, configuring the application, and instantiating/executing the underlying application logic.

Module Contents

class quota_notifier.cli.Parser(*args, prog='notifier', description='Notify users when their disk usage passes predefined thresholds', **kwargs)[source]

Responsible for defining the commandline interface and parsing commandline arguments

__init__(*args, prog='notifier', description='Notify users when their disk usage passes predefined thresholds', **kwargs) None[source]

Define arguments for the command line interface

Parameters:
  • prog – The name of the program displayed on the commandline

  • description – Top level application description

  • **kwargs – Any other arguments accepted by the ArgumentParser class

error(message: str) None[source]

Exit the application and provide the given message

class quota_notifier.cli.Application[source]

Entry point for instantiating and executing the application

classmethod run(validate: bool = False, verbosity: int = 0, debug: bool = False) None[source]

Run the application using parsed commandline arguments

Parameters:
  • validate – Validate application settings without issuing user notifications

  • verbosity – Console output verbosity

  • debug – Run the application in debug mode

classmethod execute(arg_list: List[str] = None) None[source]

Parse arguments and execute the application

This method is equivalent to parsing arguments and passing them to the run method.

Parameters:

arg_list – Parse the given argument list instead of parsing the command line