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
Metadata
Release files for pylion-yellowakita 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pylion-yellowakita-0.0.1.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pylion_yellowakita-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.7 kB
Release files / pylion-yellowakita-0.0.1.tar.gz
| Download URL | pylion-yellowakita-0.0.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c128c06c456cc2d27c8a40885094b1c0415e86235935b1ca7c9e8b75b3d35950
|
|
BLAKE2b-256 checksum How to use checksums |
930b222aa6ae6ba37aec533db6779e48f1b86e9393fc7afcde26b64361bd988a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Release files / pylion_yellowakita-0.0.1-py3-none-any.whl
| Download URL | pylion_yellowakita-0.0.1-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc0876b42f186b80734a2251c107c1e09b17ea3fdd73581e51e54c33eb89ef9a
|
|
BLAKE2b-256 checksum How to use checksums |
5c670223def122d604a2edf854d44725988d9d8cff783c9c9cff927016b812bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|