By ubaumann, Thu 11 January 2024, modified Thu 11 January 2024, in category Brief Byte
🚀 Loving #Pydantic! 😊 Version 2's BeforeValidator and AliasPath are game-changers, making data structure transformations a breeze. Excited about the efficiency and joy it brings to #Python #NetworkAutomation! 💻✨
The model MyModel
transforms the complex ietf-interfaces
data structure into a simple Pydantic model which can be dumped as JSON again if needed.