skillfed

aiohttp-sse-client2

A Server-Sent Event python client base on aiohttp

aiohttp-sse-client2 v0.3.0 119.4K downloads/30d#12,073 on PyPI6
Permissive license Apache License 2.0 DORMANT released

What it is and what it does

aiohttp-sse-client2 is an async HTTP client for consuming Server-Sent Events—a standard web protocol for pushing data from a server to a client over a persistent HTTP connection. It wraps aiohttp to provide a simple async iterator interface: you open an EventSource to a URL and iterate over incoming events, with built-in automatic reconnection if the network drops. The package is a maintained fork of an older project, updated to support modern Python versions (3.7–3.11) and to include response body details in error messages when the server returns a non-200 status.

Typical use cases are real-time data streams (stock tickers, live notifications, event logs) where you want to consume events as they arrive without polling. Because it is built on aiohttp and asyncio, it integrates naturally into async Python applications and can handle many concurrent streams efficiently. The library is in alpha status and dormant—the maintainer will retire it if the original upstream project becomes active again.

Use it for:

  • Consume live event streams from public APIs like Wikimedia's recent changes feed.
  • Build real-time dashboards or notification systems that subscribe to server-sent events.
  • Integrate SSE data ingestion into an existing aiohttp-based async application.
  • Handle network interruptions gracefully with automatic reconnection during event streaming.
  • Process continuous data feeds (logs, metrics, alerts) without polling.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides an async Python client for consuming Server-Sent Events (SSE) from HTTP endpoints using aiohttp, with automatic reconnection on network failures.

Yes, if you need SSE support in an async Python application and are comfortable with dormant maintenance. The package is stable, has no known vulnerabilities, and low install friction. However, check whether the upstream aiohttp-sse-client has resumed activity—if it has, prefer that instead, since this fork is explicitly intended to be temporary. For new projects, evaluate whether the upstream is now suitable before committing to this fork.

Install

aiohttp-sse-client2 on PyPI

pip

pip install aiohttp-sse-client2

uv

uv add aiohttp-sse-client2

poetry

poetry add aiohttp-sse-client2

Installing aiohttp-sse-client2

Before you install

Low install friction; pure Python wheel with four stable runtime dependencies (aiohttp, attrs, multidict, yarl). Maintenance is dormant—last release February 2023, no commits since September 2024, and the maintainer notes this fork will be retired if the upstream package revives.

License in practice

Apache License 2.0 is permissive; you may use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions.

Quickstart

from aiohttp_sse_client2 import client as sse_client

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

Requires Python 3.7 or later and an async runtime (asyncio event loop).

Verify before relying

  • Whether the upstream aiohttp-sse-client project has resumed active maintenance, given the stated retirement condition.
  • Specific error message improvements and response-body inclusion in exceptions mentioned in fork motivation.
  • Whether auto-reconnect behavior is configurable or has known limitations.

Package facts

License Apache License 2.0 (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 4 — aiohttp, attrs, multidict, yarl
Maintenance dormant — 1,284 days since the last release
Last repo commit
First released
Downloads 119,422/month — #12,073 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aiohttp_sse_client2-0.3.0-py2.py3-none-any.whl

Keywords: aiohttp_sse_client

Development Status :: 3 - AlphaFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP

Tags

server-sent events clientsse streaming pythonaiohttp sse clientasync event streamhttp streaming eventseventsource python clientreal-time event streaming
async-httpstreaming-eventsserver-sent-events

More WWW/HTTP packages