I have developed a library to introduce tagged unions to python that uses dataclasses to define disjoint members of the tagged union (by defining them as Optional fields). With some additional validation I make sure that only one of the fields is not None.
I find that it also fits well with the existing analysis tools and IDEs (e.g. PyCharm) and doesn’t require any additional work in order to be supported.
I would like to see some criticism and whether that could potentially be a good candidate for python standard library in the future.