Skip to main content

Python class

FastAPIRequestProtocol

FastAPIRequestProtocolโ€‹

class max.pipelines.request.FastAPIRequestProtocol(*args, **kwargs)

source

Bases: Protocol

Minimal protocol for FastAPI/Starlette Request objects.

This protocol defines the minimal interface needed from a FastAPI Request without requiring the fastapi dependency in the interfaces library.

body()โ€‹

async body()

source

Return the request body as bytes.

Return type:

bytes

stateโ€‹

state: _RequestState

source