ebraminio / aiosseclient

Asynchronous Server Side Events (SSE) client for Python 3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Asynchronous Server Side Events (SSE) Client

Similar to sseclient and sseclient-py, a tiny package for supporting Server Side Events (SSE) with py3.5 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())
ezoic increase your site revenue

About

Asynchronous Server Side Events (SSE) client for Python 3

License:MIT License


Languages

Language:Python 100.0%