Skip to content

Configuration API

config

Structured configuration objects for clients and servers.

BaseConfig dataclass

Encapsulate common configuration fields and logic.

copy

copy() -> Self

Create a deep copy of the configuration.

from_dict classmethod

from_dict(*, config_dict: dict[str, Any]) -> Self

Instantiate configuration from a dictionary.

to_dict

to_dict() -> dict[str, Any]

Serialize the configuration to a dictionary.

update

update(**kwargs: Any) -> Self

Return a new configuration with updated values.

validate

validate() -> None

Validate the configuration state.

ClientConfig dataclass

Encapsulate WebTransport client configuration.

validate

validate() -> None

Validate the client configuration state.

ServerConfig dataclass

Encapsulate WebTransport server configuration.

from_dict classmethod

from_dict(*, config_dict: dict[str, Any]) -> Self

Instantiate the server configuration with type coercion.

validate

validate() -> None

Validate the server configuration state.