Metadata-Version: 2.1
Name: wsaio
Version: 0.0.8
Summary: An event-driven WebSocket library for Python.
Home-page: https://github.com/asleep-cult/wsaio
Author: asleep-cult
License: UNKNOWN
Description: # wsaio
        An event-driven WebSocket library for Python built on top of asyncio's protocols.
        
        ```py
        import asyncio
        import itertools
        
        import wsaio
        
        URL = 'wss://echo.websocket.org'
        
        
        class HelloClient(wsaio.WebSocketClient):
            async def ws_connected(self):
                for i in itertools.count():
                    print(f'[HelloClient] Sending data - COUNT: {i}')
                    await self.send_str('Hello World')
                    await asyncio.sleep(5)
        
            def ws_text_received(self, data):
                print(f'[HelloClient] Received frame - DATA: {data}')
        
        
        client = HelloClient()
        client.loop.create_task(client.connect(URL))
        client.loop.run_forever()
        ```
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
