Skip to main content

A Server-Sent Event python client base on aiohttp

Project description

SSE Client

https://img.shields.io/pypi/v/aiohttp_sse_client.svg https://img.shields.io/travis/com/rtfol/aiohttp-sse-client.svg 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.5.3 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.

History

0.1.7 (2020-03-30)

  • Allow passing kwargs without specifying headers

0.1.6 (2019-08-06)

  • Fix Unicode NULL handling in event id field

0.1.5 (2019-08-06)

  • Fix last id reconnection (by @Ronserruya)

0.1.4 (2018-10-04)

  • Switch to Apache Software License 2.0

0.1.3 (2018-10-03)

  • Change the error handling, better fit the live specification.

0.1.2 (2018-10-03)

  • Implement auto-reconnect feature.

0.1.1 (2018-10-02)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aiohttp-sse-client, version 0.1.7
Filename, size File type Python version Upload date Hashes
Filename, size aiohttp_sse_client-0.1.7-py2.py3-none-any.whl (6.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size aiohttp-sse-client-0.1.7.tar.gz (14.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page