Store Python objects in a immutable manner and provide fast attribute lookup
Project description
Frozen is a container that:
makes internal object immutable;
supports dot notation access.
Example:
from frozen import freeze
person = {
'name': 'Mike',
'age': 17,
'scores': {
'math': [{
'name': 'test 1',
'score': 87,
'sub_score': {
'part 1': 25,
'part 2': 22,
'part 3': 40
}
}, {
'name': 'test 2',
'score': 92,
'sub_score': {
'part 1': 30,
'part 2': 23,
'part 3': 39
}
}]
}
}
frozen = freeze(person)
print(frozen['scores.math.1.sub_score.part 3']) # 39
print(frozen.scores.math[1].sub_score['part 3']) # 39
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
frozen_box-0.0.1.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for frozen_box-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3416b0ddd7e8b9d2f0bf56491eca7af839b6c258445498f9811b1cac48aede05 |
|
MD5 | 78e53760677bb947a3d3d8c371adcd56 |
|
BLAKE2b-256 | b501e47d1d441fb1cf62ed1b6d6ba7bbaa24d44578584174c1d5c10314c8ab38 |