Skip to content

Server-Sent Event python client library base on aiohttp

License

Notifications You must be signed in to change notification settings

TheDoctorAI/aiohttp-sse-client

 
 

Repository files navigation

SSE Client

Documentation Status Updates

A Server-Sent Event python client base on aiohttp, provides a simple interface to process Server-Sent Event.

Features

  • Full asyncio support
  • Easy to integrate with other aiohttp based project
  • Auto-reconnect for network issue
  • Support python 3.6 and above

Usage

from aiohttp_sse_client import client as sse_client

async with sse_client.EventSource(
    'https://stream.wikimedia.org/v2/stream/recentchange'
) as event_source:
    try:
        async for event in event_source:
            print(event)
    except ConnectionError:
        pass

Credits

This project was inspired by aiosseclient, sseclient, and sseclient-py.

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

About

Server-Sent Event python client library base on aiohttp

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 92.7%
  • Makefile 7.3%