Skip to main content

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


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 details)

Uploaded Source

Built Distribution

frozen_box-0.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file frozen_box-0.0.1.tar.gz.

File metadata

  • Download URL: frozen_box-0.0.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for frozen_box-0.0.1.tar.gz
Algorithm Hash digest
SHA256 80c22bc44e028d9b35b24c529161f75569edcfa538bd03a5ae159c467def5413
MD5 a920ea0dc8d6a481435d3824cdf4bf27
BLAKE2b-256 cb818386ff466aa2fb240ec2fa2631fc269421944df109022d855f935f8e2fc9

See more details on using hashes here.

File details

Details for the file frozen_box-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: frozen_box-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for frozen_box-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3416b0ddd7e8b9d2f0bf56491eca7af839b6c258445498f9811b1cac48aede05
MD5 78e53760677bb947a3d3d8c371adcd56
BLAKE2b-256 b501e47d1d441fb1cf62ed1b6d6ba7bbaa24d44578584174c1d5c10314c8ab38

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page