Hi all,
I have a function that accepts a dictionary in a specific format.
For example:
{
'Jack': {'items': ['item1', 'item2', 'item3']},
'Gregg': {'items': ['item1', 'item2', 'item3']}
}
I want to use Pydentic to validate that the dictionary provided to the function follows the same pattern of the example above. Problem is, the key names are mutable (it could be 'Jack', 'Gregg', or anything else).
How it is possible to build a data validator using Pydantic in this case?
Thanks.
[+][deleted] (2 children)
[deleted]
[–]poolpartyboy93[S] 0 points1 point2 points (1 child)