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 details)
Built Distribution
File details
Details for the file aiosseclient-0.1.3.tar.gz
.
File metadata
- Download URL: aiosseclient-0.1.3.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a4ac27fa78936393185cdbd20cf5d904f926259cc967a283f99b36251ece316 |
|
MD5 | 17e90ac19ad51fa27da2ded6463507f8 |
|
BLAKE2b-256 | dedc4b32285e4867dcde87522267646d43ad3a117035f66e778c960bea95efb6 |
File details
Details for the file aiosseclient-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: aiosseclient-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9a200b652c29363de47238ffa6774717a01e6742269ffe7456e525eb6acac11 |
|
MD5 | 614d210d8e142c7c6e5a293c97142937 |
|
BLAKE2b-256 | 849db00d787ec774af5128bfc16d323639d4a1f9a45ccf1ef1c44e7ed2aefd02 |