yera.cli.commands.run

Run commands: run Yera apps with the browser UI.

Symbols

def run — Run Yera apps on a local server and use them in the browser UI.

run

run(
    location: Annotated[str | None, Parameter(help='Path to a .py file or directory containing them.')] = None,
    port: Annotated[int | None, Parameter(help='Bind an exact port. Omit to prefer port 8991; Yera asks before using another port.')] = None,
    host: Annotated[str, Parameter(help='Bind address (not a URL).')] = '127.0.0.1',
    browser: Annotated[bool, Parameter(help='Whether to open a browser window or run headless.')] = True,
    ctx: Annotated[AppContext, Parameter(parse=False, show=False)],
) → None

Run Yera apps on a local server and use them in the browser UI.

Parameters

location
type: Annotated[str | None, Parameter(help='Path to a .py file or directory containing them.')] = None

Optional path to a .py file or directory containing apps.

port
type: Annotated[int | None, Parameter(help='Bind an exact port. Omit to prefer port 8991; Yera asks before using another port.')] = None

Exact bind port. When omitted, prefer port 8991 and ask before using another port.

host
type: Annotated[str, Parameter(help='Bind address (not a URL).')] = '127.0.0.1'

Bind address (not a URL).

browser
type: Annotated[bool, Parameter(help='Whether to open a browser window or run headless.')] = True

Open a browser upon starting.

Raises

ValueError

If the location is neither an application file nor a directory containing Yera applications.