In python nowadays you use data classes for that. Essentially nice with the frozen attribute. Before that there were named tuples - still useful to subclass instead of frozen data classes, as long as you don't need inheritence or any of the advanced data class field attributes.