now.dialog module#

This module implements a command-line dialog with the user. Its goal is to configure a UserInput object with users specifications. Optionally, values can be passed from the command-line when jina-now is launched. In that case, the dialog won’t ask for the value.

now.dialog.configure_user_input(**kwargs)[source]#
Return type

UserInput

now.dialog.print_headline()[source]#
now.dialog.configure_option(option, user_input, **kwargs)[source]#
Return type

DialogStatus

now.dialog.expand_options_from_parent(kwargs, option, user_input)[source]#
now.dialog.prompt_value(name, prompt_message, prompt_type='input', choices=None, **kwargs)[source]#
now.dialog.maybe_prompt_user(questions, attribute, **kwargs)[source]#

Checks the kwargs for the attribute name. If present, the value is returned directly. If not, the user is prompted via the cmd-line using the questions argument.

Parameters
Returns

A single value of either from kwargs or the user cli input.