Classes
ServerConfig
36
▼
Immutable server configuration.
All settings for a pounce server instance. Created once at startup…
ServerConfig
36
▼
Immutable server configuration.
All settings for a pounce server instance. Created once at startup, shared across all worker threads (safe because frozen).
Attributes
| Name | Type | Description |
|---|---|---|
host |
str
|
— |
port |
int
|
— |
workers |
int
|
— |
backlog |
int
|
— |
keep_alive_timeout |
float
|
— |
request_timeout |
float
|
— |
header_timeout |
float
|
— |
shutdown_timeout |
float
|
— |
max_request_size |
int
|
— |
max_header_size |
int
|
— |
max_headers |
int
|
— |
max_connections |
int
|
— |
max_requests_per_connection |
int
|
— |
access_log |
bool
|
— |
log_level |
str
|
— |
log_format |
str
|
— |
access_log_filter |
Callable[[str, str, int], bool] | None
|
— |
server_header |
str
|
— |
date_header |
bool
|
— |
root_path |
str
|
— |
compression |
bool
|
— |
compression_min_size |
int
|
— |
server_timing |
bool
|
— |
reload |
bool
|
— |
reload_include |
tuple[str, ...]
|
— |
reload_dirs |
tuple[str, ...]
|
— |
h11_max_incomplete_event_size |
int | None
|
— |
trusted_hosts |
tuple[str, ...]
|
— |
health_check_path |
str | None
|
— |
uds |
str | None
|
— |
ssl_certfile |
str | None
|
— |
ssl_keyfile |
str | None
|
— |
_VALID_LOG_LEVELS |
frozenset[str]
|
— |
_VALID_LOG_FORMATS |
frozenset[str]
|
— |
Methods
resolve_workers
0
int
▼
Return the effective worker count.
If ``workers`` is 0 (auto-detect), returns …
resolve_workers
0
int
▼
def resolve_workers(self) -> int
Return the effective worker count.
Ifworkers is 0 (auto-detect), returns os.cpu_count()
(minimum 1). Otherwise returns the explicit value.
Returns
int
Internal Methods 1 ▼
__post_init__
0
▼
Validate configuration values.
__post_init__
0
▼
def __post_init__(self) -> None