Skip to main content

This is a fork of the aiohttp-sse-client project by Jason Hu. The motivations for the fork are:

  • Better error messages when the request fails (#190)

  • Update the library to support new Python versions

The fork will be retired if the upstream package comes back alive.

Fork changelog

  • 0.3.0 (February 7, 2023) * Drop support for Python 3.6 * Support Python 3.10 and 3.11 * Include response body in exception for non-200 response codes

Original README follows:

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_client2 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.1 (2021-02-27)

  • Allow sending request with different HTTP methods (by @paulefoe)

  • Migrate to GitHub Actions

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.

Release files for aiohttp-sse-client2 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiohttp-sse-client2 0.3.0
File Size Uploaded
aiohttp-sse-client2-0.3.0.tar.gz 15.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiohttp-sse-client2 0.3.0
File Interpreter ABI Platform
aiohttp_sse_client2-0.3.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 22.3 kB

Release files / aiohttp-sse-client2-0.3.0.tar.gz

Download URL aiohttp-sse-client2-0.3.0.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5cdd33fc0d034aea339e190726bb918bc61fd3424c7ab528d07b1d60790a979f
BLAKE2b-256 checksum
How to use checksums
63e5d02277f6b7b7529ff67a476400a81f794410d068c5699750163a903b83e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / aiohttp_sse_client2-0.3.0-py2.py3-none-any.whl

Download URL aiohttp_sse_client2-0.3.0-py2.py3-none-any.whl
Size 7.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
1921bfe488667bf70651a38f54363fdd0c5f0d7021010e632bf80754c6850b25
BLAKE2b-256 checksum
How to use checksums
b97b6bd2f3767df21e44e77356e750753b7eab742586182deafe6d90363a9371
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page