The idea of putting the constants in a class is fantastic, but it can be optimized through use of the @dataclass decorator in Python 3.7+.