This commit is contained in:
2023-06-06 15:04:28 +02:00
parent e55c1abd7b
commit fa04533a74
8 changed files with 35 additions and 10 deletions

View File

@@ -0,0 +1,10 @@
from typing import Any, Sequence, TypeVar
from pydantic import BaseModel
T = TypeVar("T", bound=BaseModel)
async def dict_transformer(items: Sequence[T]) -> Sequence[dict[str, Any]]:
return [item.dict() for item in items]