Pythonic implementation of the RakNet protocol WORK IN PROGRESS
- Provide a pythonic interface (other projects exist but they feel like Java or PHP)
- Provide a decent test suite
- Parts of the code are generated from YAML files (so we can move fast by tweaking YAML, and we can share this with other projects)
- Cover enough to implement a MCPE server
In [1]: from rakpy.protocol import decode_packet
In [2]: buffer = b"\x01\x00\ (...) \x23\xa3" # data from UDP packet
In [3]: packet = decode_packet(buffer)
In [4]: print packet
UnconnectedPing(time=193351, client_guid=1450258689827747)
In [5]: packet.time
193351
In [6]: packet.client_guid
1450258689827747
In [1]: from rakpy.protocol.packets import UnconnectedPing
In [2]: packet = UnconnectedPong(ping_time=193351, server_guid=1450258689827742)
In [3]: packet.encode()
b"\x1c\x00\ (...) \x23\xa3" # you can send this over UDP