{ "info": { "author": "Igor Aleksanov", "author_email": "popzxc@yandex.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Security :: Cryptography" ], "description": "# Modified Merkle Paticia Trie\n\nMPT is the data structure used in [Ethereum](https://www.ethereum.org/) as a cryptographically authenticated key-value data storage. \n\nThis library is a Python implementation of Modified Merkle Patrica Trie with a very simple interface.\n\n## Example\n\n```python\nstorage = {}\ntrie = MerklePatriciaTrie(storage)\n\ntrie.update(b'do', b'verb')\ntrie.update(b'dog', b'puppy')\ntrie.update(b'doge', b'coin')\ntrie.update(b'horse', b'stallion')\n\nold_root = trie.root()\nold_root_hash = trie.root_hash()\n\nprint(\"Root hash is {}\".format(old_root_hash.hex()))\n\ntrie.delete(b'doge')\n\nprint(\"New root hash is {}\".format(trie.root_hash().hex()))\n\ntrie_from_old_hash = MerklePatriciaTrie(storage, root=old_root)\n\nprint(trie_from_old_hash.get(b'doge'))\n\ntry:\n print(trie.get(b'doge'))\nexcept KeyError:\n print('Not accessible in a new trie.')\n```\n\n## Installing\n\nInstall and update using [pip](https://pip.pypa.io/en/stable/quickstart/):\n\n```\npip install -U eth_mpt\n```\n\n## Documentation\n\nDocumentation can be found on [readthedocs](https://merkle-patricia-trie.readthedocs.io/en/latest/).\n\n## Contributing\n\nAll the contributors are welcome. If you can make this library better, don't hesitate to :)\n\n## Testing\n\n```bash\npython -m unittest\n```\n\n\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/popzxc/merkle-patricia-trie", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "eth-mpt", "package_url": "https://pypi.org/project/eth-mpt/", "platform": "", "project_url": "https://pypi.org/project/eth-mpt/", "project_urls": { "Homepage": "https://github.com/popzxc/merkle-patricia-trie" }, "release_url": "https://pypi.org/project/eth-mpt/0.2.0/", "requires_dist": [ "cytoolz (==0.9.0.1)", "eth-hash (==0.2.0)", "eth-typing (==2.0.0)", "eth-utils (==1.4.1)", "pycryptodome (==3.7.3)", "rlp (==1.1.0)", "toolz (==0.9.0)" ], "requires_python": "", "summary": "A simlpe Merkle Patricia Trie implementation", "version": "0.2.0" }, "last_serial": 5042236, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "414d06669449d24f522ce6aedd392d8c", "sha256": "45572af993b73da5c54e7cfd0423bf7d5f47dc63ff6060ec18ea06009e1801c8" }, "downloads": -1, "filename": "eth_mpt-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "414d06669449d24f522ce6aedd392d8c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12202, "upload_time": "2019-03-15T17:43:18", "url": "https://files.pythonhosted.org/packages/aa/15/8d0a02777d85622e3ed25e2d2a44ef5f99d137f4ee6c9e83455a603187d8/eth_mpt-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "defd4269d2a3f5174cc8d7d199b45556", "sha256": "6e2e9628c2d3082e06f69f67f1586caf07f6c510fbb480d39d01c7474f92b10f" }, "downloads": -1, "filename": "eth_mpt-0.1.0.tar.gz", "has_sig": false, "md5_digest": "defd4269d2a3f5174cc8d7d199b45556", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9770, "upload_time": "2019-03-15T17:43:20", "url": "https://files.pythonhosted.org/packages/2e/9f/d54426edff519c323843b1c21cdc2d325be8b54caf52014e435e733a04b5/eth_mpt-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "db10ec0887a93b0979e8bf14cb6171c3", "sha256": "2da48228d807ee4c86b4194ff9416d5b3db8da319027662334ddb091fb3a9de0" }, "downloads": -1, "filename": "eth_mpt-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "db10ec0887a93b0979e8bf14cb6171c3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12400, "upload_time": "2019-04-02T06:10:50", "url": "https://files.pythonhosted.org/packages/7d/f1/9e81d43dd3d195e0ee091ecafbe086be6792dee0065925d20554727a7c34/eth_mpt-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b19c9878eac2ab4b7ff9c83d970423bf", "sha256": "387af0775cd9509cfe863b11dbe7115185fcddf2783d7a72fef0377f6def866e" }, "downloads": -1, "filename": "eth_mpt-0.2.0.tar.gz", "has_sig": false, "md5_digest": "b19c9878eac2ab4b7ff9c83d970423bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9994, "upload_time": "2019-04-02T06:10:52", "url": "https://files.pythonhosted.org/packages/09/3d/d9b6056f84c67a0bd57702ef3e0d1b4946bd41ecb18672481dae286b5d8c/eth_mpt-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "db10ec0887a93b0979e8bf14cb6171c3", "sha256": "2da48228d807ee4c86b4194ff9416d5b3db8da319027662334ddb091fb3a9de0" }, "downloads": -1, "filename": "eth_mpt-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "db10ec0887a93b0979e8bf14cb6171c3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12400, "upload_time": "2019-04-02T06:10:50", "url": "https://files.pythonhosted.org/packages/7d/f1/9e81d43dd3d195e0ee091ecafbe086be6792dee0065925d20554727a7c34/eth_mpt-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b19c9878eac2ab4b7ff9c83d970423bf", "sha256": "387af0775cd9509cfe863b11dbe7115185fcddf2783d7a72fef0377f6def866e" }, "downloads": -1, "filename": "eth_mpt-0.2.0.tar.gz", "has_sig": false, "md5_digest": "b19c9878eac2ab4b7ff9c83d970423bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9994, "upload_time": "2019-04-02T06:10:52", "url": "https://files.pythonhosted.org/packages/09/3d/d9b6056f84c67a0bd57702ef3e0d1b4946bd41ecb18672481dae286b5d8c/eth_mpt-0.2.0.tar.gz" } ] }