MCPcopy Create free account
hub / github.com/dbunt1tled/python-fast-api / map_items

Method map_items

src/core/http/response/json_api.py:45–52  ·  view source on GitHub ↗
(data: list | Sequence[Any])

Source from the content-addressed store, hash-verified

43
44 @staticmethod
45 def map_items(data: list | Sequence[Any]) -> list[JsonApiResource]:
46 resources = []
47 resource_type = ""
48 if len(data) > 0:
49 resource_type = data[0].__class__.__name__
50 for item in data:
51 resources.append(ResponseBaseModel.data_to_resource(item, resource_type))
52 return resources
53
54 @staticmethod
55 def error(

Callers 1

responseMethod · 0.45

Calls 1

data_to_resourceMethod · 0.80

Tested by

no test coverage detected