make_context

Cli.make_context(info_name, args, parent=None, **extra)

This function when given an info name and arguments will kick off the parsing and create a new Context. It does not invoke the actual command callback though.

Parameters
  • info_name – the info name for this invokation. Generally this is the most descriptive name for the script or command. For the toplevel script it’s usually the name of the script, for commands below it it’s the name of the script.

  • args – the arguments to parse as list of strings.

  • parent – the parent context if available.

  • extra – extra keyword arguments forwarded to the context constructor.