httk.serve.http.apptypes

Branded httk-serve app/callback types so API implementations avoid importing Starlette directly.

Attributes

ServeApp

The httk-serve serving application type (a Starlette app; branded so consumers need not import Starlette).

ResponseHook

A zero-argument coroutine callback run once, after the response has been sent.

Module Contents

type httk.serve.http.apptypes.ServeApp = Starlette

The httk-serve serving application type (a Starlette app; branded so consumers need not import Starlette).

Annotation-only: this is a type alias, not the Starlette class, so use Starlette itself for isinstance/subclass checks.

type httk.serve.http.apptypes.ResponseHook = Callable[[], Awaitable[None]]

A zero-argument coroutine callback run once, after the response has been sent.