aiohttp-sse-client2
A Server-Sent Event python client base on aiohttp
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-client2uv
uv add aiohttp-sse-client2poetry
poetry add aiohttp-sse-client2Installing 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
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
aiohttp-sse-clientProvides an async Python client for consuming…
permissive · top 15,000 on PyPI
requests-sseProvides a Python client for consuming…
permissive · top 15,000 on PyPI
sse-starletteProvides Server-Sent Events streaming for…
permissive · top 1,000 on PyPI
aiohttp-sseProvides server-sent events (EventSource)…
permissive · top 15,000 on PyPI
httpx-sseConsume Server-Sent Event (SSE) messages from…
permissive · top 1,000 on PyPI
omnigent-clientA typed Python client SDK for driving omnigent…
unclear · top 15,000 on PyPI
launchdarkly-eventsourceConsumes Server-Sent Events (SSE) from remote…
permissive · top 5,000 on PyPI
sseclient-pyParses Server-Sent Events (SSE) from HTTP…
permissive · top 5,000 on PyPI
filigran-sseclientProvides a Python iterator interface for…
permissive · top 5,000 on PyPI
replicateA Python client for running machine learning…
permissive · top 5,000 on PyPI