Skip to navigation

nemo_gym.server_runtime.request_handling.request_gzip

View as MarkdownOpen in Claude

Gzip request decoding before model capture and JSON parsing.

Module Contents

Classes

NameDescription
GzipRequestMiddlewareDecode gzip bodies once and expose identity bytes to downstream middleware.
_DecodedBodyTooLarge-

Functions

API

class nemo_gym.server_runtime.request_handling.request_gzip.GzipRequestMiddleware(
app: starlette.types.ASGIApp,
max_decoded_bytes: int
)

Decode gzip bodies once and expose identity bytes to downstream middleware.

nemo_gym.server_runtime.request_handling.request_gzip.GzipRequestMiddleware.__call__(
scope: starlette.types.Scope,
receive: starlette.types.Receive,
send: starlette.types.Send
) -> None
async
class nemo_gym.server_runtime.request_handling.request_gzip._DecodedBodyTooLarge()
Exception

Bases: Exception

nemo_gym.server_runtime.request_handling.request_gzip._decode(
body: bytes,
max_decoded_bytes: int
) -> bytes
nemo_gym.server_runtime.request_handling.request_gzip._invalid_request_response(
message: str,
status_code: int
) -> starlette.responses.JSONResponse