skillfed

aiohttp-sse-client

A Server-Sent Event python client base on aiohttp

aiohttp-sse-client v0.2.1 160.0K downloads/30d#10,679 on PyPI48
Permissive license Apache License 2.0 DORMANT released

What it is and what it does

aiohttp-sse-client is a lightweight async wrapper around aiohttp for consuming Server-Sent Events from HTTP endpoints. It provides a simple EventSource context manager that yields events as they arrive, with automatic reconnection on network failures. The package is built on aiohttp, attrs, multidict, and yarl, and exposes a straightforward async-for interface for iterating over incoming events.

It is designed for scenarios where you need to subscribe to real-time event streams—such as live data feeds, notifications, or monitoring dashboards—without blocking your async application. The dormant maintenance status (last release 2021-02-27) means the core feature set is stable but unlikely to receive new features or rapid bug fixes.

Use it for:

  • Subscribe to live Wikimedia event streams or other public SSE endpoints for real-time data ingestion.
  • Build monitoring dashboards that consume server-pushed updates without polling.
  • Integrate event streaming into an existing aiohttp-based web service or microservice.
  • Process continuous data feeds in an async application with automatic reconnection.
  • Handle reconnection logic automatically when consuming flaky or intermittent event sources.

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) streams over HTTP using aiohttp, with built-in auto-reconnect and simple async iteration.

Yes, if you need async SSE consumption in an aiohttp-based project and can tolerate dormant maintenance. The package is stable, has no known vulnerabilities, and solves a specific problem well. Install it only if you are comfortable with a codebase that receives no active updates.

Install

aiohttp-sse-client on PyPI

pip

pip install aiohttp-sse-client

uv

uv add aiohttp-sse-client

poetry

poetry add aiohttp-sse-client

Installing aiohttp-sse-client

Before you install

Low install friction with a pure-Python wheel and four lightweight async dependencies. Maintenance is dormant—last release was 2021-02-27, over 1994 days ago, though the repository remains active with a recent commit on 2024-12-07.

License in practice

Licensed under Apache License 2.0 (permissive). You can use, modify, and distribute this package freely in commercial and private projects, with minimal restrictions.

Quickstart

from aiohttp_sse_client import client as sse_client
import asyncio

async def main():
    async with sse_client.EventSource('https://example.com/stream') as event_source:
        async for event in event_source:
            print(event)

asyncio.run(main())

Requires an event loop (asyncio); the stream URL must be accessible and return valid Server-Sent Event format.

Verify before relying

  • Whether auto-reconnect behavior is configurable (retry count, backoff strategy, timeout limits).
  • Support for HTTP methods beyond GET and custom authentication schemes.
  • Compatibility with Python versions after 3.8 (classifiers only list up to 3.8).

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,994 days since the last release
Last repo commit
First released
Downloads 160,026/month — #10,679 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aiohttp_sse_client-0.2.1-py2.py3-none-any.whl

Keywords: aiohttp_sse_client

Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8

Tags

server-sent events clientsse streaming pythonaiohttp event sourceasync http streamingreal-time event streamingserver push events pythoneventsource client async
streamingasync-ioreal-time-events

More WWW/HTTP packages