Entangled is a distributed hash table (DHT) based on Kademlia, as well as a peer-to-peer tuple space implementation. This can be used as a base for creating peer-to-peer (P2P) network applications that require synchronization and event handling (such as distributed resource provisioning systems) as well as applications that do not (such as file sharing applications).

Entangled extends basic Kademlia by adding a "DELETE" RPC, allowing (key, value) pairs to be deleted from the DHT. It also adds some useful higher-level features onto the base DHT:

  • Keyword-aware operations: allows keyword-based operations (publish, search, remove)
  • Distributed Tuple Space: a fully distributed, peer-to-peer tuple space implementation

Entangled is written in Python, and makes use of the Twisted framework. It is released under the LGPLv3+.


Download the latest Entangled release from the Entangled downloads page (earlier releases are also downloadable from this page).

Alternatively, if you use Python eggs and easy_intall, the latest version can be installed by simplying doing:

easy_install entangled

Finally, if you would like to checkout an up-to-date copy directly from the subversion repository, do:

svn co

You can also browse the subversion repository.

Entangled requires Twisted Core and Python 2.5 in order to function.


To quickly show how the DHT and tuple space work, Entangled provides a basic graphical user interface. To use it, run the and scripts in the examples subdirectory of your copy. For a freshly-checked out subversion copy, this would be:

$ cd examples
$ ln -s ../entangled
$ python 15

and, in another terminal:

$ cd examples
$ python 5000 4000

There is also a simple filesharing demonstration available. Note that these demonstration GUI scripts require PyGTK and Cairo.

The following are a few screenshots of the example programs in action: Logo