{ "info": { "author": "Brian Muller", "author_email": "bamuller@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Python Distributed Hash Table\n[![Build Status](https://secure.travis-ci.org/bmuller/kademlia.png?branch=master)](https://travis-ci.org/bmuller/kademlia)\n[![Docs Status](https://readthedocs.org/projects/kademlia/badge/?version=latest)](http://kademlia.readthedocs.org)\n\n**Documentation can be found at [kademlia.readthedocs.org](http://kademlia.readthedocs.org/).**\n\nThis library is an asynchronous Python implementation of the [Kademlia distributed hash table](http://en.wikipedia.org/wiki/Kademlia). It uses the [asyncio library](https://docs.python.org/3/library/asyncio.html) in Python 3 to provide asynchronous communication. The nodes communicate using [RPC over UDP](https://github.com/bmuller/rpcudp) to communiate, meaning that it is capable of working behind a [NAT](http://en.wikipedia.org/wiki/Network_address_translation).\n\nThis library aims to be as close to a reference implementation of the [Kademlia paper](http://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf) as possible.\n\n## Installation\n\n```\npip install kademlia\n```\n\n## Usage\n*This assumes you have a working familiarity with [asyncio](https://docs.python.org/3/library/asyncio.html).*\n\nAssuming you want to connect to an existing network:\n\n```python\nimport asyncio\nfrom kademlia.network import Server\n\nloop = asyncio.get_event_loop()\n\n# Create a node and start listening on port 5678\nnode = Server()\nloop.run_until_complete(node.listen(5678))\n\n# Bootstrap the node by connecting to other known nodes, in this case\n# replace 123.123.123.123 with the IP of another node and optionally\n# give as many ip/port combos as you can for other nodes.\nloop.run_until_complete(node.bootstrap([(\"123.123.123.123\", 5678)]))\n\n# set a value for the key \"my-key\" on the network\nloop.run_until_complete(node.set(\"my-key\", \"my awesome value\"))\n\n# get the value associated with \"my-key\" from the network\nresult = loop.run_until_complete(node.get(\"my-key\"))\nprint(result)\n```\n\n## Initializing a Network\nIf you're starting a new network from scratch, just omit the `node.bootstrap` call in the example above. Then, bootstrap other nodes by connecting to the first node you started.\n\nSee the examples folder for a first node example that other nodes can bootstrap connect to and some code that gets and sets a key/value.\n\n## Logging\nThis library uses the standard [Python logging library](https://docs.python.org/3/library/logging.html). To see debut output printed to STDOUT, for instance, use:\n\n```python\nimport logging\n\nlog = logging.getLogger('kademlia')\nlog.setLevel(logging.DEBUG)\nlog.addHandler(logging.StreamHandler())\n```\n\n## Running Tests\nTo run tests:\n\n```\npip install -r dev-requirements.txt\npython -m unittest\n```\n\n## Reporting Issues\nPlease report all issues [on github](https://github.com/bmuller/kademlia/issues).\n\n## Fidelity to Original Paper\nThe current implementation should be an accurate implementation of all aspects of the paper save one - in Section 2.3 there is the requirement that the original publisher of a key/value republish it every 24 hours. This library does not do this (though you can easily do this manually).\n\n\n", "description_content_type": "text/markdown", "docs_url": "https://pythonhosted.org/kademlia/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/bmuller/kademlia", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "kademlia", "package_url": "https://pypi.org/project/kademlia/", "platform": "", "project_url": "https://pypi.org/project/kademlia/", "project_urls": { "Homepage": "http://github.com/bmuller/kademlia" }, "release_url": "https://pypi.org/project/kademlia/2.2/", "requires_dist": [ "rpcudp (>=3.0.0)" ], "requires_python": "", "summary": "Kademlia is a distributed hash table for decentralized peer-to-peer computer networks.", "version": "2.2" }, "last_serial": 4777786, "releases": { "0.0": [], "0.1": [ { "comment_text": "", "digests": { "md5": "9354d1568a504d7977698e9c52845556", "sha256": "283239b3394764ae9d08239b3a6f90260878bca9e0bc3545a609e05135dfdde9" }, "downloads": -1, "filename": "kademlia-0.1.tar.gz", "has_sig": false, "md5_digest": "9354d1568a504d7977698e9c52845556", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10715, "upload_time": "2014-01-20T04:07:58", "url": "https://files.pythonhosted.org/packages/d6/c8/86ebb4fe6f0044bad957d61b7916042391340c293fe65352eeed1b4cc409/kademlia-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "eae6eceabfd39c3fb1edb8756858d836", "sha256": "1d3aeec1dc5b1c23841c4271b64ebeda87318ad8673ecdd77d4ab61965bfdabd" }, "downloads": -1, "filename": "kademlia-0.2.tar.gz", "has_sig": false, "md5_digest": "eae6eceabfd39c3fb1edb8756858d836", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10944, "upload_time": "2014-12-12T14:52:38", "url": "https://files.pythonhosted.org/packages/66/52/573b69ef0396ccef3ce036e717f654e5bc4cb4aaea619f649ffbe2e8d0fd/kademlia-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "7557ee48f30f25c4e8f46dbd207eb2a2", "sha256": "9b144245d481ddfb2a9e4452731449345ec95288108991198996b8e2e673b7cf" }, "downloads": -1, "filename": "kademlia-0.3.tar.gz", "has_sig": false, "md5_digest": "7557ee48f30f25c4e8f46dbd207eb2a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10986, "upload_time": "2014-12-26T19:58:07", "url": "https://files.pythonhosted.org/packages/19/71/c91a96713fd37477b9a59f35a6680a641a6584905b1c4ccbf3e84322e227/kademlia-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "a0725e001f0bd41d56c3071f4309a886", "sha256": "20293a0158bd5e4e57c4d94ce718ea923a8258efba66e01bd503f213d3421ddc" }, "downloads": -1, "filename": "kademlia-0.4.tar.gz", "has_sig": false, "md5_digest": "a0725e001f0bd41d56c3071f4309a886", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10975, "upload_time": "2015-01-04T19:40:33", "url": "https://files.pythonhosted.org/packages/89/0d/5542fa88b08f3c6bda9d2bd44610ac7f3c6bac0c1bafd9b343d13c01dd34/kademlia-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "08b1a82a0b759406aeb86400e321444c", "sha256": "5069c5d404226165ed30b9384be5dedf5f16b065ddf2344c66aa3222583e1d94" }, "downloads": -1, "filename": "kademlia-0.5.tar.gz", "has_sig": false, "md5_digest": "08b1a82a0b759406aeb86400e321444c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11440, "upload_time": "2015-06-27T19:13:26", "url": "https://files.pythonhosted.org/packages/af/f1/c39639957889ff3d9895b162fdfcc8db7b9eaec73ec5b31374f7ea92c09f/kademlia-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "6b11365ae49acb3cbcd257cf8e4f5e0e", "sha256": "0762b4a0163d3f3b559246a74488d30bbbb7521ebd2abbe3806ff9d35288124c" }, "downloads": -1, "filename": "kademlia-0.6.tar.gz", "has_sig": false, "md5_digest": "6b11365ae49acb3cbcd257cf8e4f5e0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11578, "upload_time": "2016-04-07T06:40:03", "url": "https://files.pythonhosted.org/packages/b6/d0/cc3f3af34cde48d3e4ca70bdf4bcc5e5b5f88040ebfd4c5cd2f5e2576ff2/kademlia-0.6.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "5d47b4a51a8607205f3a17583f39eba9", "sha256": "69c33de84d9607ed2ce8c9a85e2b4b01b860ae4a802b63a53c33d67619b8ff6d" }, "downloads": -1, "filename": "kademlia-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5d47b4a51a8607205f3a17583f39eba9", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 16937, "upload_time": "2018-01-02T19:30:03", "url": "https://files.pythonhosted.org/packages/79/ee/ef31f8e8f19b1b251c4cd5c3a51b1f9d1de544b93c2bbc65ce5bf09b16ab/kademlia-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "345f6e24abbe774c2f3580f3025dba49", "sha256": "aeef91d5e18465b3a1fbb29e6c9ee150850b3a47973dda3a267999940bb466cc" }, "downloads": -1, "filename": "kademlia-1.0.tar.gz", "has_sig": false, "md5_digest": "345f6e24abbe774c2f3580f3025dba49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12702, "upload_time": "2018-01-02T19:29:58", "url": "https://files.pythonhosted.org/packages/8a/69/85596deaf6b6ee7ce7b7432a33ec225116c80ed946369b1196e908376163/kademlia-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "bbf552de1f2caca370b86bb966c25989", "sha256": "1da772ad63c3e1ac1649f416324c13e14db62db3c1d6f8530beb7b54d3d89de6" }, "downloads": -1, "filename": "kademlia-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "bbf552de1f2caca370b86bb966c25989", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 16679, "upload_time": "2018-06-30T13:27:10", "url": "https://files.pythonhosted.org/packages/1a/09/5a09ecd50d92af0b50e9d734957fb0fc59816e74b2271e537885a5a0cfc7/kademlia-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2474f332055f5afe536e802283c958b6", "sha256": "e1bd7cbe0f14a717e183cd00dd316d79d27a13d3cb562345bd9301443c96197f" }, "downloads": -1, "filename": "kademlia-1.1.tar.gz", "has_sig": false, "md5_digest": "2474f332055f5afe536e802283c958b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13167, "upload_time": "2018-06-30T13:27:09", "url": "https://files.pythonhosted.org/packages/d8/ce/bff7b033a7cc304f72a1da1971766a2adf1cdb263ac9794a78148d03d18b/kademlia-1.1.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "04136daa8e2ab326f043fcd4ed6408fa", "sha256": "1c150c334b1d54f542dc933bcb88830ed42042c7a9de1b353bbb8b663ca3d374" }, "downloads": -1, "filename": "kademlia-2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "04136daa8e2ab326f043fcd4ed6408fa", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 18031, "upload_time": "2019-01-09T16:44:41", "url": "https://files.pythonhosted.org/packages/af/a9/d5ea774bb8337290b3dbaf3f2c10759e6bb3a4803ca278afa73b1c4c2332/kademlia-2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3d132c80c1eb5dd5e9324dd6c6baee1e", "sha256": "76ae72fbd34a144be0f05ea678a521f13f2f6640451fbd793c4953659a75ccdb" }, "downloads": -1, "filename": "kademlia-2.0.tar.gz", "has_sig": false, "md5_digest": "3d132c80c1eb5dd5e9324dd6c6baee1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13576, "upload_time": "2019-01-09T16:44:38", "url": "https://files.pythonhosted.org/packages/28/72/aad8c14b57c869a42e5e5f1698ea1ad04e0995fb972a2d047d0b5a20d1d3/kademlia-2.0.tar.gz" } ], "2.1": [ { "comment_text": "", "digests": { "md5": "41534baca4948f460ba9610b8623c998", "sha256": "76335f0e91c14a5a166ee4e15d40ffdeec97d7993268e4b31809bf0556974ee2" }, "downloads": -1, "filename": "kademlia-2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "41534baca4948f460ba9610b8623c998", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19972, "upload_time": "2019-02-04T13:56:47", "url": "https://files.pythonhosted.org/packages/28/de/7703c62b3056b59ef300e57d3272cfd255d2fb8a73d83662e5dd76112a5c/kademlia-2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c93393381e51bff1e578d13a2b6a6c9d", "sha256": "52efd1dd647d7088ab8c49f3c0d4c67da611265ddc8b756a8f8a81ad81f9e7c3" }, "downloads": -1, "filename": "kademlia-2.1.tar.gz", "has_sig": false, "md5_digest": "c93393381e51bff1e578d13a2b6a6c9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15639, "upload_time": "2019-02-04T13:56:48", "url": "https://files.pythonhosted.org/packages/f3/73/6dc97d034df10aa2a5a2f5875972ccf4c00ec40b76f7dc207c02c5d8d3ed/kademlia-2.1.tar.gz" } ], "2.2": [ { "comment_text": "", "digests": { "md5": "613d9b66eb2ba6192af62100f6aa1bf4", "sha256": "2aef9b11af12fc1cf1d47ac929e349a70a15d2202a61f755720fa5e47d69a16f" }, "downloads": -1, "filename": "kademlia-2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "613d9b66eb2ba6192af62100f6aa1bf4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20004, "upload_time": "2019-02-04T14:00:15", "url": "https://files.pythonhosted.org/packages/0f/b0/5d37f51dbdd22e9be2d17103109435ff1b3fa2428951289ae664db0b6be8/kademlia-2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2d070a40837bb4022ec87c37cf2e3de8", "sha256": "c28ae87e8f04cee15e06e85d83213b0d924ed4e60da0fb7b3c468df8619c6299" }, "downloads": -1, "filename": "kademlia-2.2.tar.gz", "has_sig": false, "md5_digest": "2d070a40837bb4022ec87c37cf2e3de8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15720, "upload_time": "2019-02-04T14:00:16", "url": "https://files.pythonhosted.org/packages/d9/c8/287714a142bcb2c4711e360d1c1ba4c1be956e453d3a1180b051e736dfe6/kademlia-2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "613d9b66eb2ba6192af62100f6aa1bf4", "sha256": "2aef9b11af12fc1cf1d47ac929e349a70a15d2202a61f755720fa5e47d69a16f" }, "downloads": -1, "filename": "kademlia-2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "613d9b66eb2ba6192af62100f6aa1bf4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20004, "upload_time": "2019-02-04T14:00:15", "url": "https://files.pythonhosted.org/packages/0f/b0/5d37f51dbdd22e9be2d17103109435ff1b3fa2428951289ae664db0b6be8/kademlia-2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2d070a40837bb4022ec87c37cf2e3de8", "sha256": "c28ae87e8f04cee15e06e85d83213b0d924ed4e60da0fb7b3c468df8619c6299" }, "downloads": -1, "filename": "kademlia-2.2.tar.gz", "has_sig": false, "md5_digest": "2d070a40837bb4022ec87c37cf2e3de8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15720, "upload_time": "2019-02-04T14:00:16", "url": "https://files.pythonhosted.org/packages/d9/c8/287714a142bcb2c4711e360d1c1ba4c1be956e453d3a1180b051e736dfe6/kademlia-2.2.tar.gz" } ] }