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.1.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for aiosseclient-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6515f5e659f9343db78d141245e5d94f5006b536060d306878cc84bdf28ac732 |
|
MD5 | 94dd08b4fafb568faad4f8b246046bfb |
|
BLAKE2b-256 | 7ab7f2b03cfade385d070b84ab411d6fa486d54a8d541d67046a706497dc44f9 |