commands.models

module commands.models

Global Variables

  • API_HOST


function get

get(
    model_id: int = typer.Option(
        ..., "--model-id", "-m", help="Model id to retrieve information from"
    ),
    debug: Optional[bool] = DEBUG_OPTION
)None

Command to create a user. Asks for the new users information and validates the input, then sends the information to the API

Args:

  • debug (Optional[bool], optional): Whether to add debug information, will show requests, extra logs and traceback if there is an Exception. Defaults to DEBUG_OPTION (False).

Raises:

  • ValidationError: input fields are validated, if these are not suitable the exception is raised

  • HTTPError: request error to the API, 4XX or 5XX


function list

list(
    debug: Optional[bool] = DEBUG_OPTION
)None

Command to list all models.

Args:

  • debug (Optional[bool], optional): Whether to add debug information, will show requests, extra logs and traceback if there is an Exception. Defaults to DEBUG_OPTION (False).

Raises:

  • ValidationError: input fields are validated, if these are not suitable the exception is raised

  • HTTPError: request error to the API, 4XX or 5XX


function create

create(
    name: str = typer.Option(
        ..., "--name", "-n", help="Name of the model to be created"
    ),
    description: str = typer.Option(
        None, "--description", "-d", help="Description of the model to be created"
    ),
    debug: Optional[bool] = **DEBUG_OPTION**
)None

Command to create a model. Asks for the new model's information and validates the input, then sends the information to the API

Args:

  • debug (Optional[bool], optional): Whether to add debug information, will show requests, extra logs and traceback if there is an Exception. Defaults to DEBUG_OPTION (False).

Raises:

  • ValidationError: input fields are validated, if these are not suitable the exception is raised

  • HTTPError: request error to the API, 4XX or 5XX

Last updated