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.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.

History

0.2.0 (2020-10-20)

Breaking Changes

  • Drop Python 3.5 support

  • Add Python 3.8 support

Non functional changes

  • Clarify the license (Apache Software License 2.0), thanks @fabaff

  • Update dependency packages

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.

Source Distribution

aiohttp-sse-client-0.2.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiohttp_sse_client-0.2.0-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file aiohttp-sse-client-0.2.0.tar.gz.

File metadata

  • Download URL: aiohttp-sse-client-0.2.0.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.7

File hashes

Hashes for aiohttp-sse-client-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fb8b5815086f3164abcb95665505e8c486fe388e683ba4081431c0305a1a3eda
MD5 d874ab449cf0b4bfc0cd14ef13ea0d0b
BLAKE2b-256 42a992a7197327629ece0f541d65fb11b7210946e2255b01b8a6cb67e2434c75

See more details on using hashes here.

File details

Details for the file aiohttp_sse_client-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: aiohttp_sse_client-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.7

File hashes

Hashes for aiohttp_sse_client-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e78139c8fdae83310eec9d2c600786d7472fea798dc4db39833381c043204301
MD5 a394c07d0b0a8c86dfc5a1569890abf2
BLAKE2b-256 899fcc94f40ac994fa5fe7cc36ab2a8ec338df43cc4a650d59f7ea7ad1b80d21

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page