Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylion-yellowakita-0.0.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

pylion_yellowakita-0.0.1-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page