Asynchronous Server Sent Event streams client.
Project description
Asynchronous Server Side Events (SSE) Client
Similar to sseclient and sseclient-py, a tiny package for supporting Server Side Events (SSE) with py3.9 asyncio and aiohttp.
Install it with this: pip3 install aiosseclient
Sample code (read more):
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,
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiosseclient-0.1.3.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for aiosseclient-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9a200b652c29363de47238ffa6774717a01e6742269ffe7456e525eb6acac11 |
|
MD5 | 614d210d8e142c7c6e5a293c97142937 |
|
BLAKE2b-256 | 849db00d787ec774af5128bfc16d323639d4a1f9a45ccf1ef1c44e7ed2aefd02 |