Very useful - I've had bugs due to incorrect strings entering enum like values the database and I imagine using db-checked enums like this would have saved me some huge headaches
Getting a database to line up with production code is especially important in python as pep 484 types become more commonplace. If you trust the type annotations but the database/orm is polluting data structures with values that don’t conform to the annotations, you’ve lost a lot of the annotation work’s leverage.
3 comments
[ 3.7 ms ] story [ 18.1 ms ] thread