MCPcopy
hub / github.com/encode/httpx / WSGIByteStream

Class WSGIByteStream

httpx/_transports/wsgi.py:30–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29
30class WSGIByteStream(SyncByteStream):
31 def __init__(self, result: typing.Iterable[bytes]) -> None:
32 self._close = getattr(result, "close", None)
33 self._result = _skip_leading_empty_chunks(result)
34
35 def __iter__(self) -> typing.Iterator[bytes]:
36 for part in self._result:
37 yield part
38
39 def close(self) -> None:
40 if self._close is not None:
41 self._close()
42
43
44class WSGITransport(BaseTransport):

Callers 1

handle_requestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected