dataclasses are pretty much that. They use the class mechanism but they're culturally accepted now as a clean way to build the equivalent of structs.
And e.g. you can add dataclasses-json for JSON serializability: https://pypi.org/project/dataclasses-json/
dataclasses are pretty much that. They use the class mechanism but they're culturally accepted now as a clean way to build the equivalent of structs.