Nice write up. I used to be a user of Cerberus but since than have moved to using pydantic (https://pydantic-docs.helpmanual.io/) which fits in well with my workflow of using mypy everywhere.
Nice. Thanks for sharing. One of my very favorite things about AoC is seeing how others approach it.
I’ve been using pydantic lately, and hadn’t heard of cerberus other than this extremely brief mention on pydantic’s “crude benchmarks” page. On the off chance you’ve looked at both, can you say what makes you prefer cerberus?
When I tackled day 4, I didn’t even bother with pydantic, though. This was my very unsophisticated, standard library only script. Yours is probably more readable and would certainly give a nicer error message in the face of bad input.
I have not, but definitely am now that both you and @softinio brought it up! I like that it appears to have direct support with mypy.