Module

_introspect

Built-in/_pounce/infointrospection endpoint (Sprint 5).

Disabled by default. WhenServerConfig.introspection_enabledis True, the worker dispatches GET requests atintrospection_pathto build_introspect_response() before the request reaches the ASGI application.

The response body is a JSON object with three sections:

  • runtime: Python version, GIL state, worker mode, server uptime.
  • worker: per-worker identity (worker_id) and live counters (active_connections).
  • config: theredacted_config_view() of the activeServerConfig— fail-closed via INFO_ALLOWLIST.

Seedocs/troubleshooting.md#POUNCE_CONFIG_INTROSPECTION_PUBLICfor the warning emitted when the endpoint is bound non-loopback.

Functions

_gil_enabled 0 bool
Return whether the GIL is enabled in this interpreter. Returns True on standar…
def _gil_enabled() -> bool

Return whether the GIL is enabled in this interpreter.

Returns True on standard CPython, False on free-threaded 3.14t+. Falls back to True if the API isn't available (pre-3.13 builds).

Returns
bool
build_introspect_response 3 tuple[int, list[tuple[by…
Build the ``/_pounce/info`` JSON response.
def build_introspect_response(*, config: ServerConfig, worker_id: int, active_connections: int) -> tuple[int, list[tuple[bytes, bytes]], bytes]
Parameters
Name Type Description
config ServerConfig
worker_id int
active_connections int
Returns
tuple[int, list[tuple[bytes, bytes]], bytes]