{ "info": { "author": "zshvvhm", "author_email": "zshvvhm95@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development" ], "description": "Tiny Block: A Simple Blockchain\n================================\n\n.. image:: https://travis-ci.org/zshvvhm/tinyblock.svg?branch=master\n :target: https://travis-ci.org/zshvvhm/tinyblock\n\n.. image:: https://coveralls.io/repos/github/zshvvhm/tinyblock/badge.svg\n :target: https://coveralls.io/github/zshvvhm/tinyblock\n\n\n.. image:: https://img.shields.io/pypi/v/tinyblock.svg\n :target: https://pypi.python.org/pypi/tinyblock\n\n.. image:: https://img.shields.io/pypi/l/tinyblock.svg\n :target: https://pypi.python.org/pypi/tinyblock\n\n.. image:: https://img.shields.io/pypi/pyversions/tinyblock.svg\n :target: https://pypi.python.org/pypi/tinyblock\n\nInstallation\n------------\n\nInstall and update using `pip`_:\n\n.. code-block:: bash\n\n $ pip install tinyblock\n\nBlock\n-------------\n\n.. code-block:: python\n\n dict({'previous_hash'(str): '...',\n 'timestamp'(int): '...',\n 'data'(any): '...',\n 'nonce'(int): '...',\n 'next_hash'(str): '...'})\n\nUsage\n-------------\n\n* Define a simple blockchain:\n\n .. code-block:: python\n\n from tinyblock import tinyblock\n #The initial variable should be a list of blocks. If not set it, the default chain would be an empty list.\n my_blockchain = tinyblock()\n\n* Add a block to the chain:\n\n .. code-block:: python\n\n #The parameter is the data of this block\n my_blockchain.add('This is a block.')\n\n* Find a block with statement:\n\n .. code-block:: python\n\n #Find the blocks with features below. The return elements will content the index in origin chain list.\n #Completely match: previous_hash, nonce, next_hash.\n #Partly match: data. (Currently support str, int, float, list, dict, bool and tuple)\n #Range match: timestamp.(Could be an int, list or tuple)\n my_blockchain.find(previous_hash='', timestamp='', data='', nonce='', next_hash='')\n\n* Pop the last block of the chain:\n\n .. code-block:: python\n\n my_blockchain.pop()\n\n* Check wether the blockchain is anything correct:\n\n .. code-block:: python\n\n my_blockchain.chainCheck(print_option=True)\n\n* Fix the blockchain(with start and stop index):\n\n .. code-block:: python\n\n my_blockchain.chainFix(start=0, stop=4)\n\n* Get the block list:\n\n .. code-block:: python\n\n my_blockchain.getChain()\n\n* Customise the rule for mining new block:\n\n .. code-block:: python\n\n #The default rule is hash start with '0000'.\n #To change the rule, you can override the mineRule function.\n def newRule(hash):\n if hash[0:5] == '0'*5:\n return True\n return False\n\n my_blockchain.mineRule = newRule\n\n.. _pip: https://pip.pypa.io/en/stable/quickstart/\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/zshvvhm/tinyblock", "keywords": "simple tiny blockchain", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tinyblock", "package_url": "https://pypi.org/project/tinyblock/", "platform": "", "project_url": "https://pypi.org/project/tinyblock/", "project_urls": { "Bug Reports": "https://github.com/zshvvhm/tinyblock/issues", "Homepage": "https://github.com/zshvvhm/tinyblock", "Source": "https://github.com/zshvvhm/tinyblock" }, "release_url": "https://pypi.org/project/tinyblock/0.2.0/", "requires_dist": null, "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "summary": "A simple blockchain package.", "version": "0.2.0" }, "last_serial": 3656862, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "54788c0202c98fb1168e22e5ef44b3f2", "sha256": "95a43e2367b97c5b4f4ccb6689e2041cb79d9e564eb7d30d39ffe3322a27bfbc" }, "downloads": -1, "filename": "tinyblock-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "54788c0202c98fb1168e22e5ef44b3f2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 2077, "upload_time": "2018-03-02T17:56:54", "url": "https://files.pythonhosted.org/packages/da/84/6bbd6491874fd1646e48782bf9b5177b5eb2f957dc4990f6e30577ca5913/tinyblock-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5f8e6ae4b57a66572d2c2238e44919d6", "sha256": "5cfd9e61ccc2c5d63088b3300f7652c2ec8cb782d11b582c5214cdd84b336bd0" }, "downloads": -1, "filename": "tinyblock-0.0.1.tar.gz", "has_sig": false, "md5_digest": "5f8e6ae4b57a66572d2c2238e44919d6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 1971, "upload_time": "2018-03-02T17:56:55", "url": "https://files.pythonhosted.org/packages/47/bb/ad13660e0dd31075d1e8e46d0c3751cb6bfc92c4fdc6583d1236cb24ff47/tinyblock-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "219020eb475f7fcdd677485611e4fd13", "sha256": "0bd3b7d25517477acf466c3767a6286eab2301d3a15209fcb0cdb8cec0e9a38b" }, "downloads": -1, "filename": "tinyblock-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "219020eb475f7fcdd677485611e4fd13", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 5659, "upload_time": "2018-03-02T20:02:07", "url": "https://files.pythonhosted.org/packages/9c/06/eb99c73965501e8307efab8ed3af20d1f9541ae1e787369b2fb04eb5ee19/tinyblock-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7f5b609a71bbccdc5bbc6a961b0e13d3", "sha256": "f7f4222c3d60dfbd56d165b7325883413bd880bdaae2ea4a9dcabc0a8ddcdd8a" }, "downloads": -1, "filename": "tinyblock-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7f5b609a71bbccdc5bbc6a961b0e13d3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 3678, "upload_time": "2018-03-02T20:02:09", "url": "https://files.pythonhosted.org/packages/b9/00/813362295897ed0af7b692fd4da20c8c191fad2e2802c00428a034df59f8/tinyblock-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "05e1a02d0d7cae7e67e6eaf503923081", "sha256": "5c7bdd77e7031fcdc6aa09eb33101a8cf612a768c499fa7810f97d332641e36b" }, "downloads": -1, "filename": "tinyblock-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "05e1a02d0d7cae7e67e6eaf503923081", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 3841, "upload_time": "2018-03-03T04:13:20", "url": "https://files.pythonhosted.org/packages/88/6c/37e172430ea1e49a08f6237a6149077b9668df72f2ad43eb3e366b9bf42e/tinyblock-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ca258b563031e2583c3905ecd62f7641", "sha256": "dd634ca6138f74c2dba1a8167fe6c956c2ba95b5dcb109b5c8f34e90a9b08e58" }, "downloads": -1, "filename": "tinyblock-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ca258b563031e2583c3905ecd62f7641", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 2344, "upload_time": "2018-03-03T04:13:21", "url": "https://files.pythonhosted.org/packages/0f/79/cdafeeacf2e65ac04d5ea01a4c2c34946f407692abf1d4ded7314d903428/tinyblock-0.1.1.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7062f4d477b31a0b29e70b3abbe221cf", "sha256": "7215e58a2411e03c3f2b64ff58a9b4a2c4d6df343c7955c0ca603f37e6acddf3" }, "downloads": -1, "filename": "tinyblock-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7062f4d477b31a0b29e70b3abbe221cf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 3932, "upload_time": "2018-03-04T12:14:21", "url": "https://files.pythonhosted.org/packages/78/2d/f4985251915731aa5ec1fba23fae1f88c0bdde19c153965ee17b1ab15ebf/tinyblock-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da3a361ec54ffc9f9db11481f3ebeb14", "sha256": "10d8a3a3e1a2c10f884f182d1bdaa383499a682820a717cbfd7f78b2117814f3" }, "downloads": -1, "filename": "tinyblock-0.1.3.tar.gz", "has_sig": false, "md5_digest": "da3a361ec54ffc9f9db11481f3ebeb14", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 2466, "upload_time": "2018-03-04T12:14:22", "url": "https://files.pythonhosted.org/packages/d8/a9/eb4d895e344fa0e8698ef2a1a516e3b567342fd2034fff00db55c1a99a7f/tinyblock-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "ea01e04b13362edeb6b724f36e605684", "sha256": "959e2224e45849dd16ef7e7255ed0b47894061662f6d121954319e10a8c6c248" }, "downloads": -1, "filename": "tinyblock-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ea01e04b13362edeb6b724f36e605684", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 5944, "upload_time": "2018-03-04T12:21:42", "url": "https://files.pythonhosted.org/packages/9f/7e/2d7cb0e9e78ba4e2778b590e479c7544594ed95a1b5787c285fc1c2ec6a0/tinyblock-0.1.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0f3fa801ed584bfaff305801dcf562be", "sha256": "c53a9856e0a5a200da6296955f87159ceaa65aadadeb3814c1aaa9ae1b1a6ba6" }, "downloads": -1, "filename": "tinyblock-0.1.4.tar.gz", "has_sig": false, "md5_digest": "0f3fa801ed584bfaff305801dcf562be", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 3956, "upload_time": "2018-03-04T12:21:43", "url": "https://files.pythonhosted.org/packages/69/8b/9dd47511e1f76f7f89e3abcee4dd1558973625b55e576f77b191ef5226da/tinyblock-0.1.4.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "9312ec541beba517a29f584b5db5621a", "sha256": "d90da78a1aade97e05cf675f08c32b5f671dc433a095eea14f3283cf8b29837c" }, "downloads": -1, "filename": "tinyblock-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9312ec541beba517a29f584b5db5621a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 6058, "upload_time": "2018-03-10T12:01:50", "url": "https://files.pythonhosted.org/packages/a1/fc/fa11420d5bd4199c66b6ead1ff6bc37329a673237a8017485964943c1837/tinyblock-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "83e8a0ce5b1c122155534978361d897e", "sha256": "ebfc13d44d3b56560bc2c2e869e05e8319f61c010f2789d22863a12a0d7b9f17" }, "downloads": -1, "filename": "tinyblock-0.2.0.tar.gz", "has_sig": false, "md5_digest": "83e8a0ce5b1c122155534978361d897e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 4045, "upload_time": "2018-03-10T12:01:52", "url": "https://files.pythonhosted.org/packages/f6/05/e9ba7fca7e2886d3841f7d54b635c571b237f31e3e0488c5b6f6c0b22921/tinyblock-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9312ec541beba517a29f584b5db5621a", "sha256": "d90da78a1aade97e05cf675f08c32b5f671dc433a095eea14f3283cf8b29837c" }, "downloads": -1, "filename": "tinyblock-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9312ec541beba517a29f584b5db5621a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 6058, "upload_time": "2018-03-10T12:01:50", "url": "https://files.pythonhosted.org/packages/a1/fc/fa11420d5bd4199c66b6ead1ff6bc37329a673237a8017485964943c1837/tinyblock-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "83e8a0ce5b1c122155534978361d897e", "sha256": "ebfc13d44d3b56560bc2c2e869e05e8319f61c010f2789d22863a12a0d7b9f17" }, "downloads": -1, "filename": "tinyblock-0.2.0.tar.gz", "has_sig": false, "md5_digest": "83e8a0ce5b1c122155534978361d897e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 4045, "upload_time": "2018-03-10T12:01:52", "url": "https://files.pythonhosted.org/packages/f6/05/e9ba7fca7e2886d3841f7d54b635c571b237f31e3e0488c5b6f6c0b22921/tinyblock-0.2.0.tar.gz" } ] }