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.3.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.3-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dayanara-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 ec79888f4246e49436d351949e8d853e72c8654f1482de603df06d90627bbafd
MD5 0cde94a43983d1676b7ba66e295e0ed7
BLAKE2b-256 48bcf178a425a40de37cdd9675d00fdcd88f016301be261fb0d58c8a987a6d07

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dayanara-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 81f643d616755884ba0d8fc1ffd50f7dab578158cec94e05ee49dba8f64f9129
MD5 be47de73c3ab3fc4700e8cc8e6b364ba
BLAKE2b-256 c618533c61960d1aa7a48ce24751756c335bd6a7930c5a54fb4b24e5504a6628

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