pydantic: how to make a choice of types for a field?
I have a FastAPI app and I need to create a Car class in which the attributes wheel and speed can take an int or str type. How to do it? This code does not work, because wheel and speed will have only an integer type (not str in second print):