attrs supports frozen classes. Frozen classes are cool for a multitude of reasons, but they're a tiny bit slower to instantiate compared to non-frozen classes. But there's a way to avoid this overhead and make frozen classes be the exact same speed as ordinary classes.
This post is an account of why I prefer using the attrs library over Pydantic. I'm writing it since I am often asked this question and I want to have something concrete to link to.
If you've ever gone through the Mypy docs, you might have seen the section on TypedDict. The section goes on to introduce the feature by stating: Python programs often use dictionaries with string
This is the third post in my series on the inner workings of attrs. Here are the others: attrs I: The Basics attrs II: Slots What are Frozen Classes Frozen, in this context,
This is the second post in my series on the inner workings of attrs. The series starts here. Out of the box, attrs can customize your classes in two different, orthogonal ways -