sseclient
sseclient copied to clipboard
Change event_source type from Generator to Iterator
improve typing, the event_source doesn't need to be a generator. and a generator is a iterator.
with the new typing, this would be valid in type checker:
import httpx
with httpx.stream(...) as res:
events = SSEClient(res.iter_bytes())
...