Is there any Python equivalent of Scala's Case Class? Like automatically generating constructors that assign to fields without writing out boilerplate.
The other answers about dataclass are great, but it's worth also mentioning that:

If you don't include frozen=True, then your data class won't be hashable. So if you want parity with Scala case classes (which automatically define toString, hashcode and equals) then to get hashcode, you will need @dataclass(frozen=True)
even if you do use frozen=True, if your dataclass contains an unhashable member (like a list), then the dataclass won't be hashable.
hash(some_data_class_instance) will be equal if the values are equal (and frozen=True)
From a quick empirical test, equality comparisons don't appear to be any faster if your type is hashable. Python is walking the class members to compare equality. So even if your frozen dataclass has all hashable members (e.g. tuples instead of lists), it will still walk the values to compare equality and be very slow.
Python equivalent of Scala case class