Metadata-Version: 2.1
Name: packel
Version: 1.0.0
Summary: Packet serialization/deserialization in a Pythonic way.
Home-page: https://github.com/kiwec/packel
Author: kiwec
Author-email: c.wolf@kiwec.net
License: UNKNOWN
Description: # pÃ¤ckel
        
        Network protocol library. Handles packet serialization/deserialization in a Pythonic way.
        
        ### Usage
        
        * Define a basic protocol :
        
        ```python
        import packel
        
        class Ping(packel.Packet):
            text = packel.String()
        
        class Pong(packel.Packet):
            is_hello = packel.Boolean()
        
        protocol = packel.Protocol([Ping, Pong])
        ```
        
        * Use it to serialize and deserialize data :
        
        ```python
        request = Ping(text='hello')
        serialized_bytes = protocol.serialize(request)
        
        # ...
        
        packet = protocol.deserialize(serialized_bytes)
        if isinstance(packet, Ping):
            is_hello = packet.text == 'hello'
            response = Pong(is_hello=is_hello)
            # ...
        ```
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: Public Domain
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
