sseclient icon indicating copy to clipboard operation
sseclient copied to clipboard

Change event_source type from Generator to Iterator

Open trim21 opened this issue 2 months ago • 2 comments

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())
    ...

trim21 avatar Oct 10 '25 05:10 trim21