ApplicationParser
QuantConnect.Configuration.ApplicationParser
Bases: Object
Command Line application parser
get_parameter_or_default
get_parameter_or_default(
options_object: IReadOnlyDictionary[str, Object],
parameter: str,
default_value: str,
) -> str
Gets the parameter object from the given parameter. If it does not exists, it returns a default parameter object
get_parameter_or_exit
get_parameter_or_exit(
options_object: IReadOnlyDictionary[str, Object],
parameter: str,
) -> str
Gets the parameter object from the given parameter (if it exists)
parse
parse(
application_name: str,
application_description: str,
application_help_text: str,
args: List[str],
options: List[CommandLineOption],
no_args_show_help: bool = False,
) -> Dictionary[str, Object]
This function will parse args based on options and will show application name, version, help
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
application_name
|
str
|
The application name to be shown |
required |
application_description
|
str
|
The application description to be shown |
required |
application_help_text
|
str
|
The application help text |
required |
args
|
List[str]
|
The command line arguments |
required |
options
|
List[CommandLineOption]
|
The applications command line available options |
required |
no_args_show_help
|
bool
|
To show help when no command line arguments were provided |
False
|
Returns:
| Type | Description |
|---|---|
Dictionary[str, Object]
|
The user provided options. Key is option name. |
print_message_and_exit
print_message_and_exit(
exit_code: int = 0, message: str = ...
) -> None
Prints a message advising the user to use the --help parameter for more information