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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dayanara-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 1e37b12a758c9be1870037a5ae7569575dba9c1a57d5eff4c4fe8799fab5ce88
MD5 eec2c0d7fff31919c5d9d2248eca9269
BLAKE2b-256 e438f73f45367619a33cb32f5fd1ba67a424cd0083112aeff0c06653a5f909bf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dayanara-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52cd80c66da9658fa0d355d8a3d836d38395c2dc91151c9dc3904e41df5149f9
MD5 afb2e49a7d3e03b02b2c18c23f0e072c
BLAKE2b-256 8b48d1bfcc546191454cacf55df6405ed27ec1be714214469ea005a5cb1ff83c

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