Classes
ServerConfig
71
▼
Immutable server configuration.
All settings for a pounce server instance. Created once at startup…
ServerConfig
71
▼
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
|
— |
worker_mode |
str
|
— |
cpu_affinity |
bool
|
— |
executor_threads_per_worker |
int
|
— |
keep_alive_timeout |
float
|
— |
request_timeout |
float
|
— |
header_timeout |
float
|
— |
startup_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
|
— |
debug |
bool
|
— |
reload |
bool
|
— |
reload_include |
tuple[str, ...]
|
— |
reload_dirs |
tuple[str, ...]
|
— |
h11_max_incomplete_event_size |
int | None
|
— |
trusted_hosts |
frozenset[str]
|
— |
trusted_hosts_wildcard |
bool
|
— |
health_check_path |
str | None
|
— |
uds |
str | None
|
— |
ssl_certfile |
str | None
|
— |
ssl_keyfile |
str | None
|
— |
static_files |
dict[str, str]
|
— |
static_cache_control |
str
|
— |
static_precompressed |
bool
|
— |
static_follow_symlinks |
bool
|
— |
static_index_file |
str | None
|
— |
middleware |
list[Middleware]
|
— |
websocket_compression |
bool
|
— |
websocket_max_message_size |
int
|
— |
reload_timeout |
float
|
— |
otel_endpoint |
str | None
|
— |
otel_service_name |
str
|
— |
lifecycle_logging |
bool
|
— |
log_slow_requests_threshold |
float
|
— |
metrics_enabled |
bool
|
— |
metrics_path |
str
|
— |
rate_limit_enabled |
bool
|
— |
rate_limit_requests_per_second |
float
|
— |
rate_limit_burst |
int
|
— |
request_queue_enabled |
bool
|
— |
request_queue_max_depth |
int
|
— |
http3_enabled |
bool
|
— |
http3_max_connections |
int
|
— |
http3_idle_timeout |
float
|
— |
sentry_dsn |
str | None
|
— |
sentry_environment |
str | None
|
— |
sentry_release |
str | None
|
— |
sentry_traces_sample_rate |
float
|
— |
sentry_profiles_sample_rate |
float
|
— |
_VALID_LOG_LEVELS |
frozenset[str]
|
— |
_VALID_LOG_FORMATS |
frozenset[str]
|
— |
_VALID_WORKER_MODES |
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