nvflare.fuel.hci.client.cli module
- class AdminClient(admin_config: dict, cmd_modules: List | None = None, debug: bool = False, username: str = '', handlers=None, cli_history_dir: str = '/home/docs/.nvflare', cli_history_size: int = 1000, study: str = 'default')[source]
Bases:
Cmd,EventHandlerAdmin command prompt for submitting admin commands to the server through the CLI.
- Parameters:
cmd_modules – command modules to load and register
debug – whether to print debug messages. False by default.
cli_history_size – the maximum number of commands to save in the cli history file. Defaults to 1000.
Instantiate a line-oriented interpreter framework.
The optional argument ‘completekey’ is the readline name of a completion key; it defaults to the Tab key. If completekey is not None and the readline module is available, command completion is done automatically. The optional arguments stdin and stdout specify alternate input and output file objects; if not specified, sys.stdin and sys.stdout are used.
- cmdloop(intro=None)[source]
Repeatedly issue a prompt, accept input, parse an initial prefix off the received input, and dispatch to action methods, passing them the remainder of the line as argument. Overriding what is in cmd.Cmd to handle exiting client on Ctrl+D (EOF).
- complete(text, state)[source]
Return the next possible completion for ‘text’.
If a command has not been entered, then complete against command list. Otherwise try to call complete_<command> to get list of completions.
- default(line)[source]
Called on an input line when the command prefix is not recognized.
If this method is not overridden, it prints an error message and returns.
- emptyline()[source]
Called when an empty line is entered in response to the prompt.
If this method is not overridden, it repeats the last nonempty command entered.
- handle_event(event_type: str, ctx: EventContext)[source]