httk.serve.web.cli

The httk serve web command: serve, validate, and list static widgets.

Classes

CLIContextLike

The minimal root-command context consumed by command().

Functions

build_parser(program)

Build the public httk serve web argument parser.

command(argv, context)

Dispatch the command registered by httk.registry.cli.serve.

reload_app()

Create the app selected by the process-level reload dispatcher.

Module Contents

class httk.serve.web.cli.CLIContextLike[source]

Bases: Protocol

The minimal root-command context consumed by command().

property program: str[source]

Return the root program name.

property cwd: pathlib.Path[source]

Return the root command’s working directory.

httk.serve.web.cli.build_parser(program)[source]

Build the public httk serve web argument parser.

Parameters:

program (str) – Program name displayed in command-line help.

Returns:

Configured argument parser.

Return type:

argparse.ArgumentParser

httk.serve.web.cli.command(argv, context)[source]

Dispatch the command registered by httk.registry.cli.serve.

Parameters:
Returns:

Process-style command status code.

Return type:

int

httk.serve.web.cli.reload_app()[source]

Create the app selected by the process-level reload dispatcher.

Returns:

Fresh application configured from reload environment variables.

Return type:

httk.serve.http.ServeApp