Python Enum and Pydantic : accept enum member’s composition

The bounty expires in 3 days. Answers to this question are eligible for a +250 reputation bounty. Ethan Furman wants to reward an existing answer. I have an enum : from enum import Enum class MyEnum(Enum): val1 = “val1” val2 = “val2” val3 = “val3” I would like to validate a pydantic field based on … Read more