server-sent events python client library based on requests
Project description
A Server-Sent Events python client based on requests, provides a simple interface to process Server-Sent Event.
Installation
pip install requests-sse
Usage
from requests_sse import EventSource
with EventSource("https://stream.wikimedia.org/v2/stream/recentchange") as event_source:
try:
for event in event_source:
print(event)
except ConnectionError:
pass
Credits
This project was inspired by aiohttp-sse-client, aiosseclient, sseclient, and sseclient-py.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
requests_sse-0.2.0.tar.gz
(8.8 kB
view hashes)
Built Distribution
Close
Hashes for requests_sse-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00347df8f79f48aae35a0a44ef5be169e2dcc86ad251551277fb7f2fd7309dc9 |
|
MD5 | 24a65d125756841eef8a335ed885f82f |
|
BLAKE2b-256 | 2d4fd103b66f0567e7627f0ab2c32394d13d6e7a4ec71a4152404bdb0103fb2d |