Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 17360

how to handle if root level keys are dynamic in pydantic

$
0
0
{"type": "thirdparty","key": "postgres","host": "test","id": "88c8fo90"}

or

{"type": "weburl","url": "https://www.google.com"}

Here the keys are changing based on type, how do I add a pydantic model for this?


Viewing all articles
Browse latest Browse all 17360

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>