MCPcopy
hub / github.com/encode/starlette / __init__

Method __init__

starlette/routing.py:460–465  ·  view source on GitHub ↗
(self, host: str, app: ASGIApp, name: str | None = None)

Source from the content-addressed store, hash-verified

458
459class Host(BaseRoute):
460 def __init__(self, host: str, app: ASGIApp, name: str | None = None) -> None:
461 assert not host.startswith("/"), "Host must not start with '/'"
462 self.host = host
463 self.app = app
464 self.name = name
465 self.host_regex, self.host_format, self.param_convertors = compile_path(host)
466
467 @property
468 def routes(self) -> list[BaseRoute]:

Callers 1

__init__Method · 0.45

Calls 1

compile_pathFunction · 0.85

Tested by

no test coverage detected