API
grai_cli
api
server
endpoints

is_authenticated

@client_app.command("is_authenticated",
                    help="Verify auth credentials are valid")
def is_authenticated()

get_nodes

def get_nodes(print: bool = True, to_file: Optional[Path] = None, **kwargs)

Arguments:

  • name Optional[str], optional - (Default value = None)
  • namespace Optional[str], optional - (Default value = None)
  • print bool, optional - (Default value = True)
  • to_file Optional[Path], optional - (Default value = None)

Returns:

get_nodes_cli

@client_get_app.command(
    "nodes", help=f"Grab active {default_styler('nodes')} from the guide.")
def get_nodes_cli(
        name: Optional[str] = typer.Argument(None),
        namespace: Optional[str] = typer.Option(None,
                                                "--namespace",
                                                "-n",
                                                help="Namespace of node"),
        print: bool = typer.Option(True, "--p",
                                   help=f"Print nodes to console"),
        to_file: Optional[Path] = typer.Option(None,
                                               "--f",
                                               help="Write nodes to file"))

Arguments:

  • name Optional[str], optional - (Default value = typer.Argument(None))
  • namespace Optional[str], optional - (Default value = typer.Option(None, "--namespace", "-n", help="Namespace of node"))
  • print bool, optional - (Default value = typer.Option(True, "--p", help=f"Print nodes to console"))
  • to_file Optional[Path], optional - (Default value = typer.Option(None, "--f", help="Write nodes to file"))

Returns:

get_edges

@client_get_app.command(
    "edges", help=f"Grab active {default_styler('edges')} from the guide.")
def get_edges(print: bool = typer.Option(True,
                                         "--p",
                                         help=f"Print edges to console"),
              to_file: Optional[Path] = typer.Option(
                  None, "--f", help="Write edges to file"))

Arguments:

  • print bool, optional - (Default value = typer.Option(True, "--p", help=f"Print edges to console"))
  • to_file Optional[Path], optional - (Default value = typer.Option(None, "--f", help="Write edges to file"))

Returns:

get_workspaces

@client_get_app.command(
    "workspaces",
    help=f"Grab active {default_styler('workspaces')} from the guide.")
def get_workspaces(name: str = typer.Argument(None),
                   print: bool = typer.Option(
                       True, "--p", help=f"Print workspaces to console"),
                   to_file: Optional[Path] = typer.Option(
                       None, "--f", help="Write workspaces to file"))

Arguments:

  • name str, optional - (Default value = typer.Argument(None))
  • print bool, optional - (Default value = typer.Option(True, "--p", help=f"Print workspaces to console"))
  • to_file Optional[Path], optional - (Default value = typer.Option(None, "--f", help="Write workspaces to file"))

Returns:

apply

@app.command("apply", help="Apply a configuration to The Guide by file name")
def apply(file: Path = typer.Argument(...),
          dry_run: bool = typer.Option(False,
                                       "--d",
                                       help="Dry run of file application"))

Arguments:

  • file - (Default value = typer.Argument(...))
  • dry_run - (Default value = typer.Option(False, "--d", help="Dry run of file application"))

Returns:

delete

@app.command("delete",
             help="Delete a configuration from The Guide by file name")
def delete(file: Path = typer.Argument(...),
           dry_run: bool = typer.Option(False,
                                        "--d",
                                        help="Dry run of file application"))

Arguments:

  • file Path, optional - (Default value = typer.Argument(...))
  • dry_run bool, optional - (Default value = typer.Option(False, "--d", help="Dry run of file application"))

Returns: