appyter.ext.click package

Module contents

class appyter.ext.click.Json[source]

Bases: click.types.ParamType

convert(value, param, ctx)[source]

Convert the value to the correct type. This is not called if the value is None (the missing value).

This must accept string values from the command line, as well as values that are already the correct type. It may also convert other compatible types.

The param and ctx arguments may be None in certain situations, such as when converting prompt input.

If the value cannot be converted, call :meth:fail with a descriptive message.

Parameters:
  • value – The value to convert.

  • param – The parameter that is using this type to convert

its value. May be None. :param ctx: The current context that arrived at this value. May be None.

name: str = 'Json'
split_envvar_value(rv)[source]

Given a value from an environment variable this splits it up into small chunks depending on the defined envvar list splitter.

If the splitter is set to None, which means that whitespace splits, then leading and trailing whitespace is ignored. Otherwise, leading and trailing splitters usually lead to empty items being included.

appyter.ext.click.click_argument_setenv(var, envvar=None, **kwargs)[source]

Like click.argument but explicitly set os.environ as well.

appyter.ext.click.click_option_setenv(spec, envvar=None, **kwargs)[source]

Like click.option but explicitly set os.environ as well.