ogo.cli.util.PythonLiteral module

Allow Python literals at the command line interface

class ogo.cli.util.PythonLiteral.PythonLiteral(param_decls=None, show_default=False, prompt=False, confirmation_prompt=False, hide_input=False, is_flag=None, flag_value=None, multiple=False, count=False, allow_from_autoenv=True, type=None, help=None, hidden=False, show_choices=True, show_envvar=False, **attrs)

Bases: click.core.Option

A hack for getting variable length options.

This method comes from the following Stack Overflow question: https://stackoverflow.com/questions/47631914/how-to-pass-several-list-of-arguments-to-click-option

type_cast_value(ctx, value)

Given a value this runs it properly through the type system. This automatically handles things like nargs and multiple as well as composite types.