| 176 | |
| 177 | |
| 178 | class Config: |
| 179 | def __init__( |
| 180 | self, |
| 181 | app: ASGIApplication | Callable[..., Any] | str, |
| 182 | host: str = "127.0.0.1", |
| 183 | port: int = 8000, |
| 184 | uds: str | None = None, |
| 185 | fd: int | None = None, |
| 186 | loop: LoopFactoryType | str = "auto", |
| 187 | http: type[asyncio.Protocol] | HTTPProtocolType | str = "auto", |
| 188 | ws: type[asyncio.Protocol] | WSProtocolType | str = "auto", |
| 189 | ws_max_size: int = 16 * 1024 * 1024, |
| 190 | ws_max_queue: int = 32, |
| 191 | ws_ping_interval: float | None = 20.0, |
| 192 | ws_ping_timeout: float | None = 20.0, |
| 193 | ws_per_message_deflate: bool = True, |
| 194 | lifespan: LifespanType = "auto", |
| 195 | env_file: str | os.PathLike[str] | None = None, |
| 196 | log_config: dict[str, Any] | str | os.PathLike[str] | RawConfigParser | IO[Any] | None = LOGGING_CONFIG, |
| 197 | log_level: str | int | None = None, |
| 198 | access_log: bool = True, |
| 199 | use_colors: bool | None = None, |
| 200 | interface: InterfaceType = "auto", |
| 201 | reload: bool = False, |
| 202 | reload_dirs: list[str] | str | None = None, |
| 203 | reload_delay: float = 0.25, |
| 204 | reload_includes: list[str] | str | None = None, |
| 205 | reload_excludes: list[str] | str | None = None, |
| 206 | workers: int | None = None, |
| 207 | proxy_headers: bool = True, |
| 208 | server_header: bool = True, |
| 209 | date_header: bool = True, |
| 210 | forwarded_allow_ips: list[str] | str | None = None, |
| 211 | root_path: str = "", |
| 212 | limit_concurrency: int | None = None, |
| 213 | limit_max_requests: int | None = None, |
| 214 | limit_max_requests_jitter: int = 0, |
| 215 | backlog: int = 2048, |
| 216 | timeout_keep_alive: int = 5, |
| 217 | timeout_notify: int = 30, |
| 218 | timeout_graceful_shutdown: int | None = None, |
| 219 | timeout_worker_healthcheck: int = 5, |
| 220 | callback_notify: Callable[..., Awaitable[None]] | None = None, |
| 221 | ssl_keyfile: str | os.PathLike[str] | None = None, |
| 222 | ssl_certfile: str | os.PathLike[str] | None = None, |
| 223 | ssl_keyfile_password: str | None = None, |
| 224 | ssl_version: int = SSL_PROTOCOL_VERSION, |
| 225 | ssl_cert_reqs: int = ssl.CERT_NONE, |
| 226 | ssl_ca_certs: str | os.PathLike[str] | None = None, |
| 227 | ssl_ciphers: str | None = None, |
| 228 | ssl_context_factory: Callable[[Config, Callable[[], ssl.SSLContext]], ssl.SSLContext] | None = None, |
| 229 | headers: list[tuple[str, str]] | None = None, |
| 230 | factory: bool = False, |
| 231 | h11_max_incomplete_event_size: int | None = None, |
| 232 | reset_contextvars: bool = False, |
| 233 | ): |
| 234 | self.app = app |
| 235 | self.host = host |
no outgoing calls