Metadata-Version: 2.1
Name: aiosseclient
Version: 0.1.2
Summary: Asynchronous Server Sent Event streams client.
Home-page: https://github.com/ebraminio/aiosseclient
Author: Ebrahim Byagowi
Author-email: ebrahim@gnu.org
License: Copyright (c) 2017 Ebrahim Byagowi
        
        
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        
        
        The above copyright notice and this permission notice shall be included in
        all copies or substantial portions of the Software.
        
        
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
        THE SOFTWARE.
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp

Asynchronous Server Side Events (SSE) Client 
========================

Similar to [sseclient](https://github.com/btubbs/sseclient) and [sseclient-py](https://github.com/mpetazzoni/sseclient), a tiny package for supporting Server Side Events (SSE) with py3.9 [asyncio](https://www.python.org/dev/peps/pep-3156/) and [aiohttp](http://aiohttp.readthedocs.io/en/stable/).

Install it with this: `pip3 install aiosseclient`

Sample code ([read more](https://wikitech.wikimedia.org/wiki/EventStreams)):
```python
import asyncio
import aiohttp
from aiosseclient import aiosseclient

async def main():
    async for event in aiosseclient('https://stream.wikimedia.org/v2/stream/recentchange'):
        print(event)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
```

Alternative libraries
---------------------
There are different libraries, apparently inspired from this library initially, that right now are
handling session close better using a different API,

* https://github.com/rtfol/aiohttp-sse-client
* https://github.com/JelleZijlstra/aiohttp-sse-client2
