Uma biblioteca simples para comunicação p2p na rede local
Project description
Lion
Uma biblioteca simples para comunicação p2p na rede local
Instalar
$ pip install -e lion
Exemplo
from random import randint
from peer import Peer
class HelloPeer(Peer):
def on_found(self, peer: "Peer"):
print('i am', self)
print('found', peer)
peer.send(b'hello peer!')
def on_message(self, peer: "Peer", message: bytes):
print('received', message, 'from', peer)
if __name__ == '__main__':
HelloPeer('0.0.0.0', randint(8800, 8888)).run()
2022 - Marcel Guinhos de Menezes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pylion-yellowakita-0.0.1.tar.gz
.
File metadata
- Download URL: pylion-yellowakita-0.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
c128c06c456cc2d27c8a40885094b1c0415e86235935b1ca7c9e8b75b3d35950
|
|
MD5 |
17d1c30c061f7dfd3bfe3f6d2f6ab952
|
|
BLAKE2b-256 |
930b222aa6ae6ba37aec533db6779e48f1b86e9393fc7afcde26b64361bd988a
|
File details
Details for the file pylion_yellowakita-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pylion_yellowakita-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
fc0876b42f186b80734a2251c107c1e09b17ea3fdd73581e51e54c33eb89ef9a
|
|
MD5 |
1fc1a62b9aa40d50fb709e7f6e6fcf85
|
|
BLAKE2b-256 |
5c670223def122d604a2edf854d44725988d9d8cff783c9c9cff927016b812bd
|