{ "info": { "author": "Nikita Grishko", "author_email": "gr1n@protonmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# 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 >>> from pyfrozen import FrozenDict, FrozenList\n >>>\n >>> fd = FrozenDict()\n >>> fd['key_1'] = 'value_1'\n >>> fd\n \n >>> fd.freeze()\n >>> fd\n \n >>> fd['key_1'] = 'value_2'\n Traceback (most recent call last):\n File \"\", line 1, in \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 >>> fd\n \n >>>\n >>> fl = FrozenList()\n >>> fl.extend(['value_1', 'value_2'])\n >>> fl\n \n >>> fl.freeze()\n >>> fl.pop()\n Traceback (most recent call last):\n File \"\", line 1, in \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 >>> fl\n \n >>>\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", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Gr1N/pyfrozen", "keywords": "collections,frozen,freeze", "license": "MIT", "maintainer": "Nikita Grishko", "maintainer_email": "gr1n@protonmail.com", "name": "pyfrozen", "package_url": "https://pypi.org/project/pyfrozen/", "platform": "", "project_url": "https://pypi.org/project/pyfrozen/", "project_urls": { "Homepage": "https://github.com/Gr1N/pyfrozen" }, "release_url": "https://pypi.org/project/pyfrozen/0.2.0/", "requires_dist": null, "requires_python": ">=3.6,<4.0", "summary": "Set of collections with ability to freeze their items", "version": "0.2.0" }, "last_serial": 4035646, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "07d90ae96b6aac21d87e25585029d4c9", "sha256": "8900bdb31d77a2420a35313bd84d7307a66657ecf53a05feb8670cc9db3761e2" }, "downloads": -1, "filename": "pyfrozen-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "07d90ae96b6aac21d87e25585029d4c9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3567, "upload_time": "2018-06-04T20:58:11", "url": "https://files.pythonhosted.org/packages/3f/82/471baf1bab253d4627ed7bdabf84f4468aae46ee444407fa631dd89ed59a/pyfrozen-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "946410b8e3bf13e5cd2575fbb03903af", "sha256": "5b0df891a7f6eefbdbb6496dfae6b3a68b7d5d4ed1c35edb6769bf0abe48d14f" }, "downloads": -1, "filename": "pyfrozen-0.1.0.tar.gz", "has_sig": false, "md5_digest": "946410b8e3bf13e5cd2575fbb03903af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3346, "upload_time": "2018-06-04T20:58:12", "url": "https://files.pythonhosted.org/packages/d6/92/1be011d4e5e94bada4409856e809e7175157bff2ac70df734e7a29f88cfb/pyfrozen-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "0e98a3545c29b2c66b41ce240bbd5bb3", "sha256": "eacb087b93d035aee9cfffd9872c662543be354b2c08b21a623d3f59b74d1005" }, "downloads": -1, "filename": "pyfrozen-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0e98a3545c29b2c66b41ce240bbd5bb3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 6813, "upload_time": "2018-07-06T07:48:56", "url": "https://files.pythonhosted.org/packages/ae/d5/79742346f869d2528e36bb9e34ceafbbf19c8a9242a1c868854dc2488413/pyfrozen-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f37264add929e5033a817a7bdfb2c398", "sha256": "71eddeeae3b66a7049c7949a16fc1193e75b64d9c9945ca9dc0abd3a8646c3a2" }, "downloads": -1, "filename": "pyfrozen-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f37264add929e5033a817a7bdfb2c398", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 3791, "upload_time": "2018-07-06T07:48:57", "url": "https://files.pythonhosted.org/packages/3e/23/381781a9288d54caeca6720b6ff158415a348978b242310f35c44a4c34d0/pyfrozen-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0e98a3545c29b2c66b41ce240bbd5bb3", "sha256": "eacb087b93d035aee9cfffd9872c662543be354b2c08b21a623d3f59b74d1005" }, "downloads": -1, "filename": "pyfrozen-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0e98a3545c29b2c66b41ce240bbd5bb3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 6813, "upload_time": "2018-07-06T07:48:56", "url": "https://files.pythonhosted.org/packages/ae/d5/79742346f869d2528e36bb9e34ceafbbf19c8a9242a1c868854dc2488413/pyfrozen-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f37264add929e5033a817a7bdfb2c398", "sha256": "71eddeeae3b66a7049c7949a16fc1193e75b64d9c9945ca9dc0abd3a8646c3a2" }, "downloads": -1, "filename": "pyfrozen-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f37264add929e5033a817a7bdfb2c398", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 3791, "upload_time": "2018-07-06T07:48:57", "url": "https://files.pythonhosted.org/packages/3e/23/381781a9288d54caeca6720b6ff158415a348978b242310f35c44a4c34d0/pyfrozen-0.2.0.tar.gz" } ] }