MCPcopy
hub / github.com/vinta/awesome-python / _item_list_payload

Function _item_list_payload

website/build.py:137–150  ·  view source on GitHub ↗
(entries: Sequence[TemplateEntry])

Source from the content-addressed store, hash-verified

135
136
137def _item_list_payload(entries: Sequence[TemplateEntry]) -> dict:
138 return {
139 "@type": "ItemList",
140 "numberOfItems": len(entries),
141 "itemListElement": [
142 {
143 "@type": "ListItem",
144 "position": i,
145 "name": entry["name"],
146 "url": entry["url"],
147 }
148 for i, entry in enumerate(entries, start=1)
149 ],
150 }
151
152
153def build_homepage_json_ld(entries: Sequence[TemplateEntry], total_categories: int) -> dict:

Callers 2

build_homepage_json_ldFunction · 0.85
build_category_json_ldFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected