Skip to main content

OpenDHT: A lightweight Distributed Hash Table

Project description

OpenDHT

OpenDHT is a lightweight Distributed Hash Table implementation providing an easy to use distributed in-memory data store.

Key Features

  • Lightweight and scalable, designed for large networks and small devices
  • High resilience to network disruption
  • Public key cryptography layer providing optional data signature and encryption
  • IPv4 and IPv6 support
  • Python 3 bindings
  • REST API with optional HTTP client+server with push notification support

Every node in the network can read and write values to the store. Values are distributed over the network with redundancy.

Installation

Install on Linux, macOS and Windows with:

pip install opendht

Quick Example

Using the simple, blocking API:

import opendht as dht

node = dht.DhtRunner()
node.run()

# Join the DHT network through any running node,
# here using a known bootstrap node.
node.bootstrap("bootstrap.jami.net", "4222")

# blocking call (provide callback arguments to make the call non-blocking)
node.put(dht.InfoHash.get("unique_key"), dht.Value(b'some binary data'))

results = node.get(dht.InfoHash.get("unique_key"))
for value in results:
    print(value)

Or using asyncio:

import asyncio
import opendht.aio as dht

async def dht_async_demo(key_str: str):
    # Start a new node using an async context manager.
    # It is also possible to call run()/await shutdown() manually.
    async with dht.DhtRunner(
        bootstrap=(("bootstrap.jami.net", "4222"),)
    ) as node:
        # compute key hash
        key = dht.InfoHash.get(key_str)

        # put data, waiting for completion
        await node.put(key, dht.Value(b'tata data'))

        # get all values at key
        results = await node.getAll(key)
        for value in results:
            print(value)
        
        # same operation, but stream values as they come from the network
        with node.get(key) as results:
            async for value in results:
                print(value)

        # listen for change of values at key
        with node.listen(key) as values:
            async for value, expired in values:
                print(value)
                if value.data == b'tata data':
                    break

asyncio.run(dht_async_demo("unique_key"))

Documentation

For more information, examples and documentation, or to repport issues, visit: https://opendht.net

License

Copyright (c) 2014-2026 Savoir-faire Linux Inc.

OpenDHT is released under the MIT License. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

opendht-3.7.9-cp314-cp314-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.14Windows x86-64

opendht-3.7.9-cp314-cp314-manylinux_2_34_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

opendht-3.7.9-cp314-cp314-manylinux_2_34_aarch64.whl (5.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

opendht-3.7.9-cp314-cp314-macosx_15_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

opendht-3.7.9-cp313-cp313-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.13Windows x86-64

opendht-3.7.9-cp313-cp313-manylinux_2_34_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

opendht-3.7.9-cp313-cp313-manylinux_2_34_aarch64.whl (5.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

opendht-3.7.9-cp313-cp313-macosx_15_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

opendht-3.7.9-cp312-cp312-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.12Windows x86-64

opendht-3.7.9-cp312-cp312-manylinux_2_34_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

opendht-3.7.9-cp312-cp312-manylinux_2_34_aarch64.whl (5.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

opendht-3.7.9-cp312-cp312-macosx_15_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

opendht-3.7.9-cp311-cp311-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.11Windows x86-64

opendht-3.7.9-cp311-cp311-manylinux_2_34_x86_64.whl (5.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

opendht-3.7.9-cp311-cp311-manylinux_2_34_aarch64.whl (5.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ ARM64

opendht-3.7.9-cp311-cp311-macosx_15_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

opendht-3.7.9-cp310-cp310-manylinux_2_34_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

opendht-3.7.9-cp310-cp310-manylinux_2_34_aarch64.whl (5.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ ARM64

opendht-3.7.9-cp39-cp39-manylinux_2_34_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

File details

Details for the file opendht-3.7.9-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: opendht-3.7.9-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 5.5 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for opendht-3.7.9-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 d1e4bead0e377c534e8d26493f49083d0f5660ad99d8253ef04ed3487d60fe24
MD5 89c1842ba9f32edc2a3f72f2f32fdf0d
BLAKE2b-256 90fa82f8634f5b3c307ef7a931ac3ce3988fd9de85f793011301dd508d783bee

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5f0b2f3a5a269640ff8b030e4218de0c7f008bef1610a165d5575a8e54a63736
MD5 9783b5d376e0d3cc8c7836f653c6239e
BLAKE2b-256 2479405840e517e56d4dd95e04572f27f9a0fdb41e5944fd931c26c6986980d4

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp314-cp314-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 df96265120794e0fa21f7aaf1da5344be6e9763d996011ed5b016eb5c8ed02c9
MD5 22572d4a62d6fc6853a96269441dd5c3
BLAKE2b-256 6fcccca7173bd6a0dd9ad150f2a945e7f897278cf90c0b998f004b5998a4745e

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 83a657c925f3a7f136a4211a173093ce9be16a89ef1541db11ede5e4e1bbeb94
MD5 35047125c2409df35ce116c1325f8d95
BLAKE2b-256 5233c2ca10e72d2d145b54733d8130c99e47c6eec7d252aace236cbbfd786a78

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: opendht-3.7.9-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 5.5 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for opendht-3.7.9-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 dff9d7afeac13dd95f8a8fb008ea2250af1fbd6452853ef8bb2d84edcc034320
MD5 90ab56ee626f2d4493f5a6500b47317e
BLAKE2b-256 e16f5603cd437b31563a225a66e0bf955faff64cfc08c350cff83084868798c5

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e22f4d6c0a7ccc79b7d373758d63849267806d0e14e4e874fe063f6c36bd992e
MD5 a088e4b2241742aba532be002c83d9bf
BLAKE2b-256 24899c02e593eb064208b89cad41a13959086d2a3999002416993816391eedc3

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp313-cp313-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 637250cedfd9703f1d4cd806c1e48b0ecb11f03ab9ba27870e42d6637b342bff
MD5 f12c536404fd6c6de3f925842b7135fd
BLAKE2b-256 e2b86541d1b8808d9f5763395442323a6ee2e2220e13a9327394674318f1af79

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 f47e8895775a16154a7f2897cc4d5918f26dec6bdb38c2b4113622339c7e3e12
MD5 9ce04ff3bce63e456d4615a5d3f311aa
BLAKE2b-256 72a791ae44265f4566605d7d1a9ab1bb3998163841892c8eaf8c79c37a3446b5

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: opendht-3.7.9-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 5.5 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for opendht-3.7.9-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 20be6136b349af75c5e7264430c43a38452298e3a6c4cdb28cd37368cda9b918
MD5 0e36d45f5ff9c41975f850ae8ddfa13e
BLAKE2b-256 72213d1bbfa66793b2cc0990f11a3150eb7b71d65332f240c0ff4a88f8fd2f21

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 57e697be0090d8f1e510b8b34b18125f1434ee3493aab9c35d2b907c2e7aca24
MD5 8af8afc5441d6df53a3d3023c2b565de
BLAKE2b-256 6bc80c3e35eaaece6804a65d2eacd07734bee68938b5d8aba1d289bace594b96

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp312-cp312-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 f3d972c7bf051cc8c5eee4fcc496aec4c2bfb640de0631bcc2dfae4d6de4a35a
MD5 ef68586003c8d6c09c7af71ab3ae280e
BLAKE2b-256 ccb593f5159b11df2e35228b052f198e38a5c65a3ac3624295a1f2c93f3bb013

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4aa2bb7415a62d35a2af0abe8f0450aee8aff0f6f2f199c17593debfad65626b
MD5 f793e42e01fa2587cb1bcb25c2c54a02
BLAKE2b-256 2dc53fb1ac61f08ae3446f9fb4319b9cc0f1e9328f5d40d45ea7ec899d57c665

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: opendht-3.7.9-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 5.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for opendht-3.7.9-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7b271449bc4c9fe0b420982258522f5bee86c3f91e82e6feadf7e62c30fbe87c
MD5 0681e43d62027a043e0480d4f3edadeb
BLAKE2b-256 68c081ee36e8fe34f6a736088b62286e945c3222b4cedb5abf8c4a27d039bc48

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6ab4a4f3a77def84f6ca38faf1ad731ebd154b585dd92f5808fe034220435d55
MD5 666eb224eec3c6bdbd5618b842a27139
BLAKE2b-256 e6e3a986a9b099849315c1949dc1bc42ec7593d3ccf7fbf52208f3ddcb192748

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp311-cp311-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 0cffe37c82dcb8e8c639bfbd5186e6abb0617ce30f165827b1c193731711dc73
MD5 e06fb88a874f6b39ef9b006d6281260d
BLAKE2b-256 f3ce0faa76782a5d3add1b087f9b6b7d6d99517f069c74cb5167a06aec654675

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 74bd74ddbddb48173b1fa3950b2f79b2c62a3802f5423f3d67977dd1cf04cf87
MD5 e2a85f1055115937591256d717499f20
BLAKE2b-256 ef52f0d6fdc4e49272d1ba9284a5db54e3b1235760c2271f1c040552ef5f3c1b

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9deb2cbbd54466ce22c9d5dbfbb8ebb6b76dd5454387741251d669fabc9e1292
MD5 447cf50f4429a8f8dad3c5aed4f127f8
BLAKE2b-256 f6f3ab8cd472bf19c3cd978ec8de29c6f692be62f94fbc33e9af26f2eb71da33

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp310-cp310-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp310-cp310-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 99f24d1df57054e759e22b63e72f1d67baaa04060b4a356c4f09ac716100f0d0
MD5 c07b97e8fa21d283f09a7dbf1abccc7f
BLAKE2b-256 b0d427da30216bdae7537f19836f9351e45fb3d1e777521d662001e5c1dc9f0b

See more details on using hashes here.

File details

Details for the file opendht-3.7.9-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for opendht-3.7.9-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f82008b7b4bd113c7a011f618617d53bc5245503072f2f1a0e2c1fda94ba5d88
MD5 9b26d44d7cb053c507248d187b97474d
BLAKE2b-256 9416a9c3fde3e32ba2adcf071d7ae0d0c17a7a01d7fcbd764a199860d1fb0b9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page