kademlia/docs/intro.rst

42 lines
1.2 KiB
ReStructuredText
Raw Normal View History

2015-01-05 19:44:39 +01:00
Installation
2015-01-05 16:32:24 +01:00
==================
2015-01-05 19:44:39 +01:00
The easiest (and best) way to install kademlia is through `pip <http://www.pip-installer.org/>`_::
$ pip install kademlia
Usage
=====
Assuming you want to connect to an existing network (run the `Stand-alone Server`_ example below if you don't have a network):
.. literalinclude:: ../examples/example.py
Check out the examples folder for other examples.
.. note ::
You must have at least two nodes running to store values. If a node tries to store a value and there are no other nodes to provide redundancy, then it is an exception state.
2015-01-05 19:44:39 +01:00
Stand-alone Server
2015-01-05 16:32:24 +01:00
==================
2015-01-05 19:44:39 +01:00
If all you want to do is run a local server, just start the example server::
$ twistd -noy examples/server.tac
Running Tests
=============
To run tests::
$ trial kademlia
Fidelity to Original Paper
==========================
2015-06-04 23:58:01 +02:00
The current implementation should be an accurate implementation of all aspects of the paper except 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).
2015-01-05 19:44:39 +01:00
.. _Twisted: https://twistedmatrix.com