{"id":16691276,"url":"https://github.com/gr1n/pyfrozen","last_synced_at":"2025-06-21T21:06:50.217Z","repository":{"id":144088907,"uuid":"136081297","full_name":"Gr1N/pyfrozen","owner":"Gr1N","description":"Set of collections with ability to freeze their items","archived":false,"fork":false,"pushed_at":"2018-11-23T13:41:21.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-23T05:13:54.397Z","etag":null,"topics":["collection","freeze","frozen","frozendict","frozenlist"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pyfrozen/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gr1N.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-04T20:50:42.000Z","updated_at":"2018-11-23T13:41:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"e8881b94-45b3-4d1f-aef6-adcd6514ff69","html_url":"https://github.com/Gr1N/pyfrozen","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Gr1N/pyfrozen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gr1N%2Fpyfrozen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gr1N%2Fpyfrozen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gr1N%2Fpyfrozen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gr1N%2Fpyfrozen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gr1N","download_url":"https://codeload.github.com/Gr1N/pyfrozen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gr1N%2Fpyfrozen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261193101,"owners_count":23122907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["collection","freeze","frozen","frozendict","frozenlist"],"created_at":"2024-10-12T16:07:41.003Z","updated_at":"2025-06-21T21:06:45.199Z","avatar_url":"https://github.com/Gr1N.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyfrozen [![Build Status](https://travis-ci.org/Gr1N/pyfrozen.svg?branch=master)](https://travis-ci.org/Gr1N/pyfrozen) [![codecov](https://codecov.io/gh/Gr1N/pyfrozen/branch/master/graph/badge.svg)](https://codecov.io/gh/Gr1N/pyfrozen) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\nSet of collections with ability to freeze their items.\n\n## Installation\n\n    $ pip install pyfrozen\n\n## Usage\n\n    \u003e\u003e\u003e from pyfrozen import FrozenDict, FrozenList\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e fd = FrozenDict()\n    \u003e\u003e\u003e fd['key_1'] = 'value_1'\n    \u003e\u003e\u003e fd\n    \u003cFrozenDict(frozen=False, {'key_1': 'value_1'})\u003e\n    \u003e\u003e\u003e fd.freeze()\n    \u003e\u003e\u003e fd\n    \u003cFrozenDict(frozen=True, {'key_1': 'value_1'})\u003e\n    \u003e\u003e\u003e fd['key_1'] = 'value_2'\n    Traceback (most recent call last):\n    File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    File \"/pyfrozen/pyfrozen/frozendict.py\", line 23, in __setitem__\n        self.assert_frozen()\n    File \"/pyfrozen/pyfrozen/frozendict.py\", line 45, in assert_frozen\n        raise RuntimeError('Cannot modify frozen dict')\n    RuntimeError: Cannot modify frozen dict\n    \u003e\u003e\u003e fd\n    \u003cFrozenDict(frozen=True, {'key_1': 'value_1'})\u003e\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e fl = FrozenList()\n    \u003e\u003e\u003e fl.extend(['value_1', 'value_2'])\n    \u003e\u003e\u003e fl\n    \u003cFrozenList(frozen=False, ['value_1', 'value_2'])\u003e\n    \u003e\u003e\u003e fl.freeze()\n    \u003e\u003e\u003e fl.pop()\n    Traceback (most recent call last):\n    File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    File \"/lib/python3.6/_collections_abc.py\", line 997, in pop\n        del self[index]\n    File \"/pyfrozen/pyfrozen/frozenlist.py\", line 29, in __delitem__\n        self.assert_frozen()\n    File \"/pyfrozen/pyfrozen/frozenlist.py\", line 56, in assert_frozen\n        raise RuntimeError('Cannot modify frozen list')\n    RuntimeError: Cannot modify frozen list\n    \u003e\u003e\u003e fl\n    \u003cFrozenList(frozen=True, ['value_1', 'value_2'])\u003e\n    \u003e\u003e\u003e\n\n## Contributing\n\nTo work on the `pyfrozen` codebase, you'll want to clone the project locally and install the required dependencies via [poetry](https://poetry.eustace.io):\n\n    $ git clone git@github.com:Gr1N/pyfrozen.git\n    $ poetry install\n\nTo run tests and linters use command below:\n\n    $ poetry run tox\n\nIf you want to run only tests or linters you can explicitly specify which test environment you want to run, e.g.:\n\n    $ poetry run tox -e py37-tests\n\n## TODO\n\n- [ ] Implement all collections using [Cython](http://cython.org)\n\n## License\n\n`pyfrozen` is licensed under the MIT license. See the license file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr1n%2Fpyfrozen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgr1n%2Fpyfrozen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr1n%2Fpyfrozen/lists"}