--- id: recordtype version: "1.4" license: Apache License Version 2.0 license_treatment: permissive maintenance: abandoned --- # recordtype — Similar to namedtuple, but instances are mutable. License: permissive · Maintenance: abandoned · Downloads: 93.0K/mo ## What it is and what it does recordtype is a factory function that generates mutable record classes—similar to collections.namedtuple but with write support and flexible default-value handling. Unlike namedtuple, instances are fully mutable, and you can specify per-field defaults, a global default for all unspecified fields, or both. It depends only on six and generates pure Python classes with introspection members like _fields, _asdict(), and _source. The package is production-stable but abandoned; its author explicitly recommends that Python 3.7+ users use dataclasses instead, and points to namedlist and attrs as better-maintained alternatives. It remains useful for legacy codebases or Python 2 compatibility, but new projects should consider those alternatives. Use it for: - Migrating from namedtuple to a mutable variant when you need to modify field values after instantiation. - Creating lightweight data containers with sensible field defaults to reduce boilerplate initialization code. - Supporting Python 2.6+ codebases that predate dataclasses and need a simple mutable record type. - Building configuration or state objects where fields have meaningful defaults and occasional mutation is expected. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. recordtype creates mutable record classes with optional per-field and global default values, similar to namedtuple but with write support and configurable defaults. No, unless you are maintaining legacy Python 2 code or a codebase already using recordtype. For new projects on Python 3.7+, use dataclasses; for more advanced use cases, use attrs or namedlist. The package is abandoned and its author recommends against it. ## Install pip install recordtype uv add recordtype poetry add recordtype ## Installing recordtype Before you install: Low install friction with a single pure-Python dependency (six). However, the package is abandoned as of 1422 days since its last release; the author explicitly recommends Python 3.7+ users switch to dataclasses, and points to namedlist and attrs as better-maintained alternatives. License in practice: Licensed under Apache License Version 2.0 (permissive). You can use, modify, and distribute recordtype freely in commercial and private projects with minimal restrictions. Quickstart: from recordtype import recordtype Point = recordtype('Point', [('x', 0), ('y', 0)]) p = Point() p.x = 5 print(p.x, p.y) # 5 0 Verify before relying: - Whether the package works reliably on Python 3.10+ despite the last update being in 2022. - Performance characteristics compared to dataclasses or attrs in modern Python versions. - Whether the mutable-default-value warning mentioned in the changelog is still active. ## Package facts - License: Apache License Version 2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 93.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags mutable namedtuple, record type with defaults, mutable data structure, field defaults factory, namedtuple alternative, writable tuple-like class, structured data with mutations, legacy, data-structure [View on SkillFed](https://skillfed.io/packages/recordtype) · [View on PyPI](https://pypi.org/project/recordtype/)