MCPcopy
hub / github.com/fastapi/fastapi / get_path

Method get_path

fastapi/routing.py:1890–1893  ·  view source on GitHub ↗
(self, scope: Scope)

Source from the content-addressed store, hash-verified

1888 return _get_resolved_absolute_path(self.directory)
1889
1890 def get_path(self, scope: Scope) -> str:
1891 path = _get_fastapi_scope(scope).get(_FASTAPI_FRONTEND_PATH_KEY, "")
1892 assert isinstance(path, str)
1893 return os.path.normpath(os.path.join(*path.split("/")))
1894
1895 async def get_response(self, path: str, scope: Scope) -> Response:
1896 if scope["method"] not in ("GET", "HEAD"):

Callers

nothing calls this directly

Calls 2

_get_fastapi_scopeFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected