0

How can I parse the following YAML

a: 1
custom-A: 2
custom-B: 3

into a model like

from pydantic import BaseModel

class Model(BaseMode):
  a: int = 3

but having also access to the non-modeled additional fields custom-A etc... Is this possible?

Gabriel
  • 8,990
  • 6
  • 57
  • 101

0 Answers0