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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dayanara-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 5139b6082b4d0a7836903632bb0db0cab2ccae99daa0e4161835093d828efb94
MD5 fa5f8e088bdf301c34b11f94fdde3554
BLAKE2b-256 dd56061d514faa58aa614b3302b55c2b007f58c24d81db22214c2ba9d33e15f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dayanara-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b84214d65002b928452bd156430a0b72fc7e69337c419e71dd95026fce933c2e
MD5 445a702fc694f1b897f253c12493f58d
BLAKE2b-256 bb457275a8b5698519962506b84fdc9132518e5d8961b003ce00d0e8bc7710f5

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