Skip to main content

A lightweight peer-to-peer networking protocol implementation in Python with bootstrap server support for peer discovery and room-based connections.

Project description

Dayanara

Dayanara is a lightweight peer-to-peer networking library for Python that allows peers to discover each other using bootstrap servers and communicate inside rooms.

Installation

pip install dayanara

Basic usage

from dayanara import Dayanara

d = Dayanara()
d.join("room1")

d.send("Hola")
msg = d.receive()
print(msg)

API

Dayanara

Dayanara(bootstraps=None, debug=False)

Create a new Dayanara instance.

  • bootstraps: list of bootstrap servers (optional)
  • debug: enable debug output (default: False)

join(room: str)

Join a room and start peer discovery.

send(data)

Send data to all connected peers.

receive()

Block until a message is received and return it.

peers_list()

Return the list of known peers.

License

MIT

Project details


Download files

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

Source Distribution

dayanara-0.1.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

dayanara-0.1.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file dayanara-0.1.1.tar.gz.

File metadata

  • Download URL: dayanara-0.1.1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for dayanara-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4888d196967ec7589cadd501a158f1147e313fba91e7d3b5f1ddabe3fa943ee3
MD5 1908f2d53ad8052fac405d32fa419e2f
BLAKE2b-256 37ca481061e630dfdcf7333714c1a1562ca2151229a88f76937e8d9c45a122ba

See more details on using hashes here.

File details

Details for the file dayanara-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dayanara-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for dayanara-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 df5ec90de08102f8164ce11bd8add2be6a92223f67a5f48d06cb63e23e6be573
MD5 f719b5c5a86b4bde89dfa010d8a106b3
BLAKE2b-256 81ce401246e62551d6354c871a5ecbbf5ebc006d95dc46fe4c9074c52ee814cb

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