MCPcopy Create free account
hub / github.com/fastapi/fastapi / get_banner_sponsors

Function get_banner_sponsors

scripts/docs.py:524–537  ·  view source on GitHub ↗
(sponsors: dict[str, Any])

Source from the content-addressed store, hash-verified

522
523
524def get_banner_sponsors(sponsors: dict[str, Any]) -> list[dict[str, str]]:
525 banner_sponsors: list[dict[str, str]] = []
526 for sponsor in sponsors.get("gold", []):
527 banner_img = sponsor.get("banner_img")
528 if not banner_img:
529 continue
530 banner_sponsors.append(
531 {
532 "url": sponsor.get("banner_url", sponsor["url"]),
533 "title": sponsor.get("banner_title", sponsor["title"]),
534 "img": banner_img,
535 }
536 )
537 return banner_sponsors
538
539
540def render_banner_sponsors_partial() -> str:

Callers 1

Calls 1

getMethod · 0.45

Tested by

no test coverage detected