Posts

Showing posts with the label instantiation

Instantiate a pydantic BaseModel from a dictionary object



To instantiate a pydantic.BaseModel we can call the parse_obj method of our model class and provide a dictionary with the content.


Github gitst with code

dependencies: python3.9, pydantic==1.9.2