MCPcopy
hub / github.com/fastapi/fastapi / from_frontend_route_group

Method from_frontend_route_group

fastapi/routing.py:1466–1488  ·  view source on GitHub ↗
(
        cls,
        *,
        original_route: "_FrontendRouteGroup",
        include_context: _RouterIncludeContext,
    )

Source from the content-addressed store, hash-verified

1464
1465 @classmethod
1466 def from_frontend_route_group(
1467 cls,
1468 *,
1469 original_route: "_FrontendRouteGroup",
1470 include_context: _RouterIncludeContext,
1471 ) -> "_EffectiveRouteContext":
1472 dependencies = [*include_context.dependencies, *original_route.dependencies]
1473 context = cls(
1474 original_route=original_route,
1475 frontend_prefix=include_context.prefix,
1476 dependencies=dependencies,
1477 dependency_overrides_provider=include_context.dependency_overrides_provider,
1478 )
1479 (
1480 context.dependant,
1481 context._flat_dependant,
1482 context._embed_body_fields,
1483 ) = _build_dependant_with_parameterless_dependencies(
1484 path="",
1485 call=_frontend_dependency_endpoint,
1486 dependencies=dependencies,
1487 )
1488 return context
1489
1490 def matches(self, scope: Scope) -> tuple[Match, Scope]:
1491 if isinstance(self.original_route, _FrontendRouteGroup):

Callers 1

Tested by

no test coverage detected