Mutable variant of collections.namedtuple, which supports assignments
Project description
recordclass is MIT Licensed python library. It implements the type memoryslots and factory function recordclass in order to create record-like classes.
memoryslots is tuple-like type, which supports assignment operations.
recordclass is a factory function that create a “mutable” analog of collection.namedtuple.
This library actually is a “proof of concept” for the problem of fast “mutable” alternative of namedtuple.
Main repository for recordclass is on bitbucket.
Here is also a simple example.
Quick start:
First load inventory:
>>> from recordclass import recordclass, RecordClass
Simple example with recordclass:
>>> Point = recordclass('Point', 'x y')
>>> p = Point(1,2)
>>> print(p)
Point(1, 2)
>>> print(p.x, p.y)
1 2
>>> p.x, p.y = 10, 20
>>> print(p.x, p.y)
10 20
Simple example with RecordClass and typehints:
class Point(RecordClass): x: int y: int >>> p = Point(1, 2) >>> print(p) Point(1, 2) >>> print(p.x, p.y) 1 2 >>> p.x, p.y = 10, 20 >>> print(p.x, p.y) 10 20
Changes:
0.6
Add support for default values in recordclass factory function in correspondence to same addition to namedtuple in python 3.7.
0.5
Change version to 0.5
0.4.4
Add support for default values in RecordClass (patches from Pedro von Hertwig)
Add tests for RecorClass (adopted from python tests for NamedTuple)
0.4.3
Add support for typing for python 3.6 (patches from Vladimir Bolshakov).
Resolve memory leak issue.
0.4.2
Fix memory leak in property getter/setter
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file recordclass-0.6.tar.gz.
File metadata
- Download URL: recordclass-0.6.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
471bba0fdec91f48cc6be8fb1a94862e154f0d57d07dde706ae7db627f70edfb
|
|
| MD5 |
8531488ad86fec70bede2e03c3b1aaa1
|
|
| BLAKE2b-256 |
c0292bb2bb3a12e8134754266c8f90464d8b41120d7cf287e68471b61469b88b
|
File details
Details for the file recordclass-0.6-cp37-cp37m-win_amd64.whl.
File metadata
- Download URL: recordclass-0.6-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 24.3 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2093d93ef64812b8c7003900d2072a79459de36f284b3a216062ef53efe7e9fd
|
|
| MD5 |
2bdd1afd1636ae76d520f2146f99c47f
|
|
| BLAKE2b-256 |
0a60ff36e69a3a0f6d55d761b2c75a3651cdddad4404b6df3642ccf64b1d018a
|
File details
Details for the file recordclass-0.6-cp37-cp37m-win32.whl.
File metadata
- Download URL: recordclass-0.6-cp37-cp37m-win32.whl
- Upload date:
- Size: 22.8 kB
- Tags: CPython 3.7m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
282ae86fd90086983b7d08b683de61410c174c47db351eb27e4ac1d72ee3dd1a
|
|
| MD5 |
266a368b616547c52a66f8c026eb2a61
|
|
| BLAKE2b-256 |
098a78ed6c12ca74d1e000ba36f5817630f97e65614a1b67114824d26ce5e187
|
File details
Details for the file recordclass-0.6-cp37-cp37m-macosx_10_9_x86_64.whl.
File metadata
- Download URL: recordclass-0.6-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 22.4 kB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89fc14e8e134e781a38b76da4c7d275d0a214aca0ec76ce8119e79d9d6e3e184
|
|
| MD5 |
13f3d909eb18463effbaad0550539bfe
|
|
| BLAKE2b-256 |
47f603a2c55abdf6f42b9b55d3778a50986671d6e8121a450e991425812a4831
|
File details
Details for the file recordclass-0.6-cp36-cp36m-win_amd64.whl.
File metadata
- Download URL: recordclass-0.6-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 24.3 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b812ab31d89c129ebec2c881286df4ab5e0e173c86b9b89c03ac0bf111ed1f87
|
|
| MD5 |
1bd6ff20c2ddfdd6b4a13d3bcf30bc10
|
|
| BLAKE2b-256 |
462e641bbdb7c291d67d4178d437bad3f66a0074e775cca3f1077b58932eb260
|
File details
Details for the file recordclass-0.6-cp36-cp36m-win32.whl.
File metadata
- Download URL: recordclass-0.6-cp36-cp36m-win32.whl
- Upload date:
- Size: 22.8 kB
- Tags: CPython 3.6m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd8f3715766e5ea822bfb72e268bb14d13178859df45650da0a5154cfb809aa4
|
|
| MD5 |
78eae28a936a7639b1b61b7df04ae5f2
|
|
| BLAKE2b-256 |
4245a97d08152fb493ad7320cd8e5c62a6776e209a3c3edd5e9c2ee0e9b85c4b
|
File details
Details for the file recordclass-0.6-cp36-cp36m-macosx_10_9_x86_64.whl.
File metadata
- Download URL: recordclass-0.6-cp36-cp36m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 22.4 kB
- Tags: CPython 3.6m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69ac6e14bb843ff208d6d6250db44012280540ffbf4126da597d5efd6e2e1426
|
|
| MD5 |
a0cac2c856e8410e6777ebd7ab6ff6ea
|
|
| BLAKE2b-256 |
8104ed7193db2c882c63e6f5c0ec979ff6c9549ad39f173293f2ca859d5ea81a
|
File details
Details for the file recordclass-0.6-cp35-cp35m-win_amd64.whl.
File metadata
- Download URL: recordclass-0.6-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 21.2 kB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
255cea0a83840fea39b34914f9fd6fd9481a64ba84d1305629060ee67958af89
|
|
| MD5 |
b4f7d8a2f740149a863c2110341b6bee
|
|
| BLAKE2b-256 |
630585ba1defd8cecb4df640624d61dc17149dc6e73bec5f419f968dcad66cc3
|
File details
Details for the file recordclass-0.6-cp35-cp35m-win32.whl.
File metadata
- Download URL: recordclass-0.6-cp35-cp35m-win32.whl
- Upload date:
- Size: 19.7 kB
- Tags: CPython 3.5m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e0ff9e35b867a59b60e50493bdb50182797cfae357c6da1834c04e0fe98cac2
|
|
| MD5 |
4db279ae19be6e37a5f4d6be1cbb856c
|
|
| BLAKE2b-256 |
152b922f58a7251b5946e4db8fe56e7544607a52c40e0742e82648448caf5bf1
|
File details
Details for the file recordclass-0.6-cp35-cp35m-macosx_10_6_intel.whl.
File metadata
- Download URL: recordclass-0.6-cp35-cp35m-macosx_10_6_intel.whl
- Upload date:
- Size: 25.9 kB
- Tags: CPython 3.5m, macOS 10.6+ Intel (x86-64, i386)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7941fe7c24be252c46ddf31b8cda92b30e5d272c1003468b2bc20663e72830d
|
|
| MD5 |
8cfef4356bb7a87dd9ab239fe6b2c633
|
|
| BLAKE2b-256 |
f2caf635fe8a74e44d9654f9da5b339878cb0bfa8fe79dfdd4310dfa2e78701c
|
File details
Details for the file recordclass-0.6-cp34-cp34m-win_amd64.whl.
File metadata
- Download URL: recordclass-0.6-cp34-cp34m-win_amd64.whl
- Upload date:
- Size: 18.8 kB
- Tags: CPython 3.4m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
614d8c14eda76d05706e67933671d250010dfeaa604f9f6f89929ed6c242ccd8
|
|
| MD5 |
b9a3d4ca2765e39da13142534baa7d18
|
|
| BLAKE2b-256 |
319ec39d164c59d8531b8269aa37bca3ed54fe4db12bc5a9a05659a13577df11
|
File details
Details for the file recordclass-0.6-cp34-cp34m-win32.whl.
File metadata
- Download URL: recordclass-0.6-cp34-cp34m-win32.whl
- Upload date:
- Size: 18.3 kB
- Tags: CPython 3.4m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae021dba8d3d298d5cc221a25fef0aa6474f2ebb539e6d8a4e4042c631614c3d
|
|
| MD5 |
715947c9465aa50341cde9ac0a7a0730
|
|
| BLAKE2b-256 |
d5f9261a6861db30b23b8a04041e2c2755589b53b045f8417a33777f250c1d22
|
File details
Details for the file recordclass-0.6-cp34-cp34m-macosx_10_6_intel.whl.
File metadata
- Download URL: recordclass-0.6-cp34-cp34m-macosx_10_6_intel.whl
- Upload date:
- Size: 25.8 kB
- Tags: CPython 3.4m, macOS 10.6+ Intel (x86-64, i386)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b617b6d3683cddf83f32d349053b743b0262ed8a48dc1d10bc53968b9ae90e15
|
|
| MD5 |
261a661432f7ef2d46a8c4bb6f31e0d3
|
|
| BLAKE2b-256 |
49573f8b8d9e9eeb08e67bbf40ddd8f669663f0bd8e53dc57cdc08dd799a17e7
|
File details
Details for the file recordclass-0.6-cp27-cp27m-win_amd64.whl.
File metadata
- Download URL: recordclass-0.6-cp27-cp27m-win_amd64.whl
- Upload date:
- Size: 19.0 kB
- Tags: CPython 2.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7db9bb4a2cdfe1f3414d509437c7e9dc0ce43b76a0ad32c95adae9c045cf750b
|
|
| MD5 |
0ce1dd58fea6a3a842b6224f63060266
|
|
| BLAKE2b-256 |
3cc682ad0aac5b748960f38074355df9583b2043f93e1ccdc0beda73a603757e
|
File details
Details for the file recordclass-0.6-cp27-cp27m-win32.whl.
File metadata
- Download URL: recordclass-0.6-cp27-cp27m-win32.whl
- Upload date:
- Size: 18.4 kB
- Tags: CPython 2.7m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08351630b55b67b35e4d9d2e714c6f9c1a280042ddee0a3a38122c8547a1b11a
|
|
| MD5 |
ab17744a65a2677d4dcb7d3243841ecf
|
|
| BLAKE2b-256 |
0f5efc5e244d796fb7ef30c873f392ded16fc6b99bdbd369b33afd9ee96089b4
|
File details
Details for the file recordclass-0.6-cp27-cp27m-macosx_10_9_x86_64.whl.
File metadata
- Download URL: recordclass-0.6-cp27-cp27m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 19.3 kB
- Tags: CPython 2.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
726d4c9bc4e664f921335bf51c557baba8e718eacf08ce5b810944dc6e0038d1
|
|
| MD5 |
f170a7f13a7b5393fab27df3311bcb52
|
|
| BLAKE2b-256 |
7c36a3443c504ab0324b7c04cf3b798540e98d9dc0537c4faf321c4cb2d37577
|