I enjoy using Python, but the dynamic typing makes me itch.
This week I came across Pydantic, a great library that goes some way towards scratching this long-standing itch.
Pydantic allows you to inherit from its BaseModel
class in your own classes; Pydantic will then try its best to parse the given input into the type you have specified in your type hints.
from pydantic import BaseModel