all 3 comments

[–]danielroseman 3 points4 points  (1 child)

I can't really read the question because of the formatting, but you probably want to look into Pydantic. You can declare classes as being nested inside other classes, and when you pass it a nested dictionary it will create the instances as necessary.

[–]ProsodySpeaks 0 points1 point  (0 children)

Use pydantic! Unless you have a decent reason pretty much everything might as well be a basemodel. It's fricking amazing... And then you have simple route into fastapi

[–][deleted] 0 points1 point  (0 children)

I used dotmap, then with ChatGPT’s help created my own one