Module Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults vararg kwarg body Return Call NameLoad Call NameLoad NameLoad NameLoad decorator_list Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults vararg kwarg body Return Call NameLoad AttributeLoad Call NameLoad attr NameLoad NameLoad decorator_list Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults vararg kwarg body Assign NameStore Call NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad SubscriptLoad NameLoad Slice Num NameLoad decorator_list Return Call NameLoad NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str TryExcept body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Delete AttributeDel NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Expr Call NameLoad Return Call NameLoad keyword BoolOpOr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad kwarg body Expr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse If UnaryOpNot Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call NameLoad NameLoad Call NameLoad NameLoad NameLoad Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str FunctionDef arguments args NameParam defaults body If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call NameLoad NameLoad Call NameLoad NameLoad NameLoad Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam NameParam NameParam defaults body If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Return Call Call NameLoad BoolOpOr NameLoad TupleLoad Str NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Return Call Call NameLoad BoolOpOr NameLoad TupleLoad Str NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad vararg kwarg body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr Num attr attr Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str FunctionDef arguments args NameParam NameParam NameParam defaults body If BoolOpOr UnaryOpNot NameLoad AttributeLoad NameLoad attr body Return Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr attr Assign NameStore NameLoad If CompareIs NameLoad NameLoad body TryExcept body Import alias handlers ExceptHandler type NameLoad body Pass orelse For NameStore AttributeLoad NameLoad attr body Assign NameStore BoolOpOr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Dict For TupleStore NameStore NameStore Call NameLoad NameLoad body If CompareEq AttributeLoad NameLoad attr NameLoad body Assign NameStore AttributeLoad NameLoad attr Break If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Expr Call NameLoad BinOpMod NameLoad Dict Str Str NameLoad NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str Str Assign SubscriptStore NameLoad Index Str NameLoad Return Call Call NameLoad BoolOpOr NameLoad TupleLoad Str NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam NameParam NameParam defaults body If BoolOpAnd NameLoad UnaryOpNot AttributeLoad NameLoad attr body Expr Call NameLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return Call Call NameLoad BoolOpOr NameLoad TupleLoad Str NameLoad NameLoad decorator_list Return NameLoad decorator_list ImportFrom alias alias alias alias
N/A N/A sys N/A inspect functools update_wrapper _compat iteritems _unicodefun _check_for_unicode_literals utils echo globals get_current_context pass_context N/A N/A f N/A N/A N/A Marks a callback as wanting to receive the current context
    object as first argument.
     new_func N/A N/A N/A args kwargs N/A N/A N/A f N/A get_current_context args kwargs N/A N/A N/A update_wrapper new_func f N/A pass_obj N/A N/A f N/A N/A N/A Similar to :func:`pass_context`, but only pass the object on the
    context onwards (:attr:`Context.obj`).  This is useful if that object
    represents the state of a nested system.
     new_func N/A N/A N/A args kwargs N/A N/A N/A f N/A N/A get_current_context obj args kwargs N/A N/A N/A update_wrapper new_func f N/A make_pass_decorator N/A N/A object_type ensure N/A False N/A N/A Given an object type this creates a decorator that will work
    similar to :func:`pass_obj` but instead of passing the object of the
    current context, it will find the innermost context of type
    :func:`object_type`.

    This generates a decorator that works roughly like this::

        from functools import update_wrapper

        def decorator(f):
            @pass_context
            def new_func(ctx, *args, **kwargs):
                obj = ctx.find_object(object_type)
                return ctx.invoke(f, obj, *args, **kwargs)
            return update_wrapper(new_func, f)
        return decorator

    :param object_type: the type of the object to pass.
    :param ensure: if set to `True`, a new object will be created and
                   remembered on the context if it's not there yet.
     decorator N/A N/A f N/A N/A new_func N/A N/A N/A args kwargs N/A N/A ctx N/A get_current_context N/A ensure N/A N/A obj N/A N/A ctx ensure_object object_type N/A N/A obj N/A N/A ctx find_object object_type N/A N/A obj None N/A N/A N/A RuntimeError N/A Managed to invoke callback without a context object of type %r existing N/A object_type __name__ N/A N/A N/A ctx invoke f obj N/A args N/A 1 kwargs N/A N/A N/A update_wrapper new_func f N/A N/A decorator N/A _make_command N/A N/A f name attrs cls N/A N/A N/A N/A isinstance f Command N/A N/A N/A TypeError Attempted to convert a callback into a command twice. N/A N/A N/A params N/A f __click_params__ N/A N/A N/A params reverse N/A N/A f __click_params__ N/A N/A N/A AttributeError N/A N/A params N/A N/A help N/A N/A attrs get help N/A N/A help None N/A N/A help N/A N/A inspect getdoc f N/A N/A isinstance help bytes N/A N/A help N/A N/A help decode utf-8 N/A N/A help N/A N/A inspect cleandoc help N/A N/A attrs N/A help help N/A N/A _check_for_unicode_literals N/A N/A cls name N/A name N/A N/A N/A f __name__ lower callback f params params attrs N/A command N/A N/A name cls N/A None None attrs N/A N/A Creates a new :class:`Command` and uses the decorated function as
    callback.  This will also automatically attach all decorated
    :func:`option`\s and :func:`argument`\s as parameters to the command.

    The name of the command defaults to the name of the function.  If you
    want to change that, you can pass the intended name as the first
    argument.

    All keyword arguments are forwarded to the underlying command class.

    Once decorated the function turns into a :class:`Command` instance
    that can be invoked as a command line utility or be attached to a
    command :class:`Group`.

    :param name: the name of the command.  This defaults to the function
                 name.
    :param cls: the command class to instantiate.  This defaults to
                :class:`Command`.
     N/A N/A cls None N/A N/A cls Command decorator N/A N/A f N/A N/A N/A cmd N/A _make_command f name attrs cls N/A N/A cmd __doc__ N/A f __doc__ N/A cmd N/A N/A decorator N/A group N/A N/A name N/A None attrs N/A N/A Creates a new :class:`Group` with a function as callback.  This
    works otherwise the same as :func:`command` just that the `cls`
    parameter is set to :class:`Group`.
     N/A N/A N/A attrs setdefault cls Group N/A N/A command name attrs N/A _param_memo N/A N/A f param N/A N/A N/A N/A isinstance f Command N/A N/A N/A N/A N/A f params append param N/A N/A N/A N/A hasattr f __click_params__ N/A N/A N/A f __click_params__ N/A N/A N/A N/A N/A f __click_params__ append param N/A argument N/A N/A N/A param_decls attrs N/A N/A Attaches an argument to the command.  All positional arguments are
    passed as parameter declarations to :class:`Argument`; all keyword
    arguments are forwarded unchanged (except ``cls``).
    This is equivalent to creating an :class:`Argument` instance manually
    and attaching it to the :attr:`Command.params` list.

    :param cls: the argument class to instantiate.  This defaults to
                :class:`Argument`.
     decorator N/A N/A f N/A N/A N/A ArgumentClass N/A N/A attrs pop cls Argument N/A N/A _param_memo f N/A ArgumentClass param_decls attrs N/A f N/A N/A decorator N/A option N/A N/A N/A param_decls attrs N/A N/A Attaches an option to the command.  All positional arguments are
    passed as parameter declarations to :class:`Option`; all keyword
    arguments are forwarded unchanged (except ``cls``).
    This is equivalent to creating an :class:`Option` instance manually
    and attaching it to the :attr:`Command.params` list.

    :param cls: the option class to instantiate.  This defaults to
                :class:`Option`.
     decorator N/A N/A f N/A N/A N/A N/A help attrs N/A N/A N/A attrs N/A help N/A N/A inspect cleandoc N/A attrs N/A help N/A OptionClass N/A N/A attrs pop cls Option N/A N/A _param_memo f N/A OptionClass param_decls attrs N/A f N/A N/A decorator N/A confirmation_option N/A N/A N/A param_decls attrs N/A N/A Shortcut for confirmation prompts that can be ignored by passing
    ``--yes`` as parameter.

    This is equivalent to decorating a function with :func:`option` with
    the following parameters::

        def callback(ctx, param, value):
            if not value:
                ctx.abort()

        @click.command()
        @click.option('--yes', is_flag=True, callback=callback,
                      expose_value=False, prompt='Do you want to continue?')
        def dropdb():
            pass
     decorator N/A N/A f N/A N/A callback N/A N/A ctx param value N/A N/A N/A N/A value N/A N/A N/A N/A ctx abort N/A N/A N/A N/A attrs setdefault is_flag True N/A N/A N/A attrs setdefault callback callback N/A N/A N/A attrs setdefault expose_value False N/A N/A N/A attrs setdefault prompt Do you want to continue? N/A N/A N/A attrs setdefault help Confirm the action without prompting. N/A N/A N/A option N/A param_decls N/A --yes attrs f N/A N/A decorator N/A password_option N/A N/A N/A param_decls attrs N/A N/A Shortcut for password prompts.

    This is equivalent to decorating a function with :func:`option` with
    the following parameters::

        @click.command()
        @click.option('--password', prompt=True, confirmation_prompt=True,
                      hide_input=True)
        def changeadmin(password):
            pass
     decorator N/A N/A f N/A N/A N/A N/A N/A attrs setdefault prompt True N/A N/A N/A attrs setdefault confirmation_prompt True N/A N/A N/A attrs setdefault hide_input True N/A N/A N/A option N/A param_decls N/A --password attrs f N/A N/A decorator N/A version_option N/A N/A version N/A None param_decls attrs N/A N/A Adds a ``--version`` option which immediately ends the program
    printing out the version number.  This is implemented as an eager
    option that prints the version and exits the program in the callback.

    :param version: the version number to show.  If not provided Click
                    attempts an auto discovery via setuptools.
    :param prog_name: the name of the program (defaults to autodetection)
    :param message: custom message to show instead of the default
                    (``'%(prog)s, version %(version)s'``)
    :param others: everything else is forwarded to :func:`option`.
     N/A N/A version None N/A N/A module N/A N/A N/A N/A N/A sys _getframe 1 f_globals get __name__ decorator N/A N/A f N/A N/A N/A prog_name N/A N/A attrs pop prog_name None N/A message N/A N/A attrs pop message %(prog)s, version %(version)s callback N/A N/A ctx param value N/A N/A N/A N/A N/A value N/A ctx resilient_parsing N/A N/A N/A prog prog_name N/A N/A prog None N/A N/A prog N/A N/A N/A ctx find_root info_name N/A ver version N/A N/A ver None N/A N/A N/A N/A pkg_resources N/A N/A N/A ImportError N/A N/A N/A N/A dist N/A pkg_resources working_set N/A N/A scripts N/A N/A N/A N/A N/A dist get_entry_map get console_scripts N/A N/A N/A script_name entry_point N/A iteritems scripts N/A N/A N/A N/A entry_point module_name module N/A N/A ver N/A dist version N/A N/A N/A ver None N/A N/A N/A RuntimeError Could not determine version N/A N/A echo N/A message N/A prog version prog ver color N/A ctx color N/A N/A N/A ctx exit N/A N/A N/A N/A attrs setdefault is_flag True N/A N/A N/A attrs setdefault expose_value False N/A N/A N/A attrs setdefault is_eager True N/A N/A N/A attrs setdefault help Show the version and exit. N/A N/A attrs N/A callback callback N/A N/A N/A option N/A param_decls N/A --version attrs f N/A N/A decorator N/A help_option N/A N/A N/A param_decls attrs N/A N/A Adds a ``--help`` option which immediately ends the program
    printing out the help page.  This is usually unnecessary to add as
    this is added by default to all commands unless suppressed.

    Like :func:`version_option`, this is implemented as eager option that
    prints in the callback and exits.

    All arguments are forwarded to :func:`option`.
     decorator N/A N/A f N/A N/A callback N/A N/A ctx param value N/A N/A N/A N/A value N/A N/A ctx resilient_parsing N/A N/A N/A echo N/A N/A ctx get_help color N/A ctx color N/A N/A N/A ctx exit N/A N/A N/A N/A attrs setdefault is_flag True N/A N/A N/A attrs setdefault expose_value False N/A N/A N/A attrs setdefault help Show this message and exit. N/A N/A N/A attrs setdefault is_eager True N/A N/A attrs N/A callback callback N/A N/A N/A option N/A param_decls N/A --help attrs f N/A N/A decorator N/A core Command Group Argument Option