venvmod.commands package

Submodules

Module contents

This module defines commands available to cli.

venvmod.commands.get_parser(description: str, positionals: List[Tuple[str, Any, str, Any]] = None, with_appli: bool = False, options: List[Tuple[str, Any, str]] = None, args: List = None) Namespace[source]

Create a parser for entry-points.

Parameters:
  • description (str) – Description of the command

  • positionals (List[Tuple[str, Any, str, Any]], optional) – list of positionals (‘name’, default, ‘help’, nargs), by default None

  • with_appli (bool, optional) – True to enable ‘–appli’ option, by default False

  • options (List[Tuple[str, Any, str]], optional) – list of options defined as (’–option-name’, default, ‘help’), by default None

  • args (List, optional) – list of arguments if not given throug cli, by default None

Returns:

parsed arguments

Return type:

argparse.Namespace

venvmod.commands.get_module_filepath(virtual_env: Path, appli_name: str = None) Path[source]

_summary_

Parameters:
  • virtual_env (pathlib.Path) – name or path to the virtual env

  • appli_name (str, optional) – name of the application, by default None

Returns:

name of the module file associated to the appli

Return type:

Path