recordclass is a Python library that provides mutable variants of `collections.namedtuple`, supporting assignments and offering memory-saving alternatives like `dataobject` and `structclass`. These types aim for high performance and reduced memory footprint by optionally disabling cyclic garbage collection and removing instance dictionaries. Currently at version 0.24, the library is actively maintained with releases supporting the latest Python versions, including 3.14, and aims to be a fast, memory-efficient, and flexible choice for data representation.
Verified import paths — ran on the pinned version, not inferred.
For creating mutable namedtuple-like classes.
For creating compact dataclass-like objects with memory optimizations.
Factory function to create dataobject-based classes, similar to standard dataclasses.make_dataclass.
Decorator for def-style declarations of dataobject-based classes that behave like structs.
The base type for recordclass instances; less commonly directly instantiated by users.
This quickstart demonstrates how to create mutable record-like objects using `recordclass`, `dataobject` (similar to dataclasses), `make_dataclass`, and the `as_record` decorator. It highlights the mutability aspect and attribute access.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.