Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 352 Bytes

README.md

File metadata and controls

15 lines (12 loc) · 352 Bytes

pi_protocol

How to use

import pi_protocol

data: bytes = b"\x82\x00\x05Steve\x00\x00\x00\x09\x00\x00\x00\x09"
decoded_packet: dict = pi_protocol.decode_packet(data)
print("Decoded your packet :)")
print(decoded_packet)
print("let's reencode it :)")
encoded_packet: bytes = pi_protocol.encode_packet(decoded_packet)
print(encoded_packet)