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.2.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for aiosseclient-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab1eff52421e3f77e4a4d9d2d931d891210752082732db49f13f04013ff32fd0 |
|
MD5 | 203afce03ec1f575a4b7b18212673508 |
|
BLAKE2b-256 | d8887214794d237ccb860001d489739adf68f6cb29e5c291990aa40795445435 |