A Server-Sent Events python client based on requests, provides a simple interface to process Server-Sent Events.
Installation
pip install requests-sse
Usage
import requests
from requests_sse import EventSource, InvalidStatusCodeError, InvalidContentTypeError
with EventSource("https://stream.wikimedia.org/v2/stream/recentchange", timeout=30) as event_source:
try:
for event in event_source:
print(event)
except InvalidStatusCodeError:
pass
except InvalidContentTypeError:
pass
except requests.RequestException:
pass
Credits
This project was inspired by aiohttp-sse-client, aiosseclient, sseclient, and sseclient-py.
Metadata
Release files for requests-sse 0.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| requests_sse-0.5.3.tar.gz | 9.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| requests_sse-0.5.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.3 kB
Release files / requests_sse-0.5.3.tar.gz
| Download URL | requests_sse-0.5.3.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
107c63afb2a2292b422ab2504849f3adb54b4c884700646ebe9f6e4178ba375c
|
|
BLAKE2b-256 checksum How to use checksums |
1394f0f29584c3ca24c29a72e19a28136f73ed08adddc93fb8a0c998577c9085
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.
Transparency logRelease files / requests_sse-0.5.3-py3-none-any.whl
| Download URL | requests_sse-0.5.3-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc3e053e22fdcf002ca1fbd1794967d42b82b24539f5b7fe0e807301dd4ef4ec
|
|
BLAKE2b-256 checksum How to use checksums |
5a873704da8cc1cb91cc0ccee8fb03d8ed11217afcd028352f3b1242fee2f4f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.
Transparency log