Skip to content

Reference

Argument

Argument(
    name: str,
    description: Optional[str] = None,
    required: Optional[bool] = False,
    default: Optional[str] = None,
    choices: Optional[List[Any]] = None,
    type: Optional[type] = str,
)

Parameters:

  • name

    (str) –

    The name of the argument.

  • description

    (Optional[str], default: None ) –

    The description to display for the argument.

  • required

    (Optional[bool], default: False ) –

    Whether the argument is required.

  • default

    (Optional[str], default: None ) –

    The default value for the argument.

  • choices

    (Optional[List[Any]], default: None ) –

    The choices available for the argument.

  • type

    (Optional[type], default: str ) –

    The type of the argument.

Attributes:

Source code in saiuncli/argument.py
def __init__(
    self,
    name: str,
    description: Optional[str] = None,
    required: Optional[bool] = False,
    default: Optional[str] = None,
    choices: Optional[List[Any]] = None,
    type: Optional[type] = str,
):
    """
    Initialize an Argument object.

    Args:
        name (str):
            The name of the argument.
        description (Optional[str]):
            The description to display for the argument.
        required (Optional[bool]):
            Whether the argument is required.
        default (Optional[str]):
            The default value for the argument.
        choices (Optional[List[Any]]):
            The choices available for the argument.
        type (Optional[type]):
            The type of the argument.
    """
    self.name = name
    self.description = description
    self.required = required
    self.default = default
    self.choices = choices
    self.type = type

choices instance-attribute

choices = choices

default instance-attribute

default = default

description instance-attribute

description = description

name instance-attribute

name = name

required instance-attribute

required = required

type instance-attribute

type = type