Registry / serialization / recordtype

recordtype

JSON →
library1.4pypypi✓ verified 34d ago

Provides a mutable alternative to namedtuple. Users define a class with fields and get a mutable, tuple-like object with named attributes. Last stable version is 1.4, released in 2012. No active development, but still usable. Use with caution in new projects.

serialization
Install & Compatibility
Where this runs
tested against v1.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.012s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.010s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Direct import recordtype is not a class; it's a module. Must import the class.

from recordtype import recordtype

Creates a mutable record type with named fields.

from recordtype import recordtype # Define a record type Person = recordtype('Person', 'name age email') p = Person('Alice', 30, 'alice@example.com') print(p.name) # Alice p.age = 31 # mutable print(p.age) # 31
Debug
Known footguns
deprecatedrecordtype has been unmaintained since 2012. Consider using types.SimpleNamespace, dataclasses, or attrs for new projects.
gotchaField names are specified as a single string with spaces. It's easy to accidentally use commas or other delimiters.
gotcharecordtype does not support type hints or validation. Field values can be any type and are not checked.
breakingrecordtype returns an object that is not compatible with some pickle protocols due to its internal _fields attribute.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
14 hits · last 30 days
gptbot
4
bytedance
4
ahrefsbot
3
claudebot
2
script
1
Resources