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

Method url_path_for

starlette/routing.py:621–627  ·  view source on GitHub ↗
(self, name: str, /, **path_params: Any)

Source from the content-addressed store, hash-verified

619 await response(scope, receive, send)
620
621 def url_path_for(self, name: str, /, **path_params: Any) -> URLPath:
622 for route in self.routes:
623 try:
624 return route.url_path_for(name, **path_params)
625 except NoMatchFound:
626 pass
627 raise NoMatchFound(name, path_params)
628
629 async def lifespan(self, scope: Scope, receive: Receive, send: Send) -> None:
630 """

Callers 1

test_reverse_mount_urlsFunction · 0.95

Calls 2

NoMatchFoundClass · 0.85
url_path_forMethod · 0.45

Tested by 1

test_reverse_mount_urlsFunction · 0.76