server-sent events python client library based on requests
Project description
A Server-Sent Event 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.1.0.tar.gz
(8.5 kB
view hashes)
Built Distribution
Close
Hashes for requests_sse-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6fdb1dc9f8902493800c3775bc35b5e7931d73e218022b0a7504a0bd26be477 |
|
MD5 | f93b87710457c758b8850aa3c4acbfb5 |
|
BLAKE2b-256 | 2c920c5d1012566245bfe2b79d6873eb049da8ba02b3aebbbfc0f8537c0d2076 |