Ushka

API reference

ushka.cli.commands.run

ushka run (production) and the server logic shared with ushka dev.

def serve(app_path: str, host: str, port: int, dev: bool) -> None

Starts Uvicorn for app_path (module:attribute).

In development, debug is forced on through USHKA_APP_DEBUG (inherited by Uvicorn's reload worker) and the code is reloaded on change. In production, debug comes from the configuration and several workers can be used.

def run(app_path: str, host: str, port: int) -> None

Production server.