Metadata-Version: 2.4
Name: dayanara
Version: 0.1.3
Summary: A lightweight peer-to-peer networking protocol implementation in Python with bootstrap server support for peer discovery and room-based connections.
Author: Olaf Pedersen
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENCE
Dynamic: license-file


# 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

```bash
pip install dayanara
````

## Basic usage

```python
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
