vpip.cli

This module includes the main CLI entry point.

vpip.cli.add_arguments(parser, options)

Add JSON-formatted argument list to parser.

Parameters:
vpip.cli.cli(args=None)

CLI entry point.

Parameters:

args (list) – Argument list. Use sys.argv[1:] if None.

You can invoke this function like:

from vpip.cli import cli
cli(["install", "-g", "my-package"])
vpip.cli.patch_argparse()

Patch argparse. Make ArgumentParser.add_subparsers() accept a new keyword argument fallback, which is a function receving a args list and returning a new args or None.

This function can be called multiple times, but only the first call will patch the module.