Logic for parse SSE event
Project description
parse-sse
from parse_sse import parse_sse
url = 'http://localhost:8000/your_endpoint'
response = requests.get(url, stream=True)
for event in parse_sse(response):
print(f"Event: {event['event']}")
print(f"Data: {event['data']}")
print("---")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
parse-sse-0.0.0.1.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for parse_sse-0.0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dbe1b452c8bc7848294845a7a601681688927516f3407ff326d8afcf2ff9343 |
|
MD5 | ac9525a24503213545b65e3c29d56183 |
|
BLAKE2b-256 | 474c704c7d0021e04a213e1b975b361686b94dcbd6819416369df2a7ec73f60c |