aiinbx 0.117.0__py3-none-any.whl → 0.162.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aiinbx/_streaming.py +12 -10
- aiinbx/_version.py +1 -1
- {aiinbx-0.117.0.dist-info → aiinbx-0.162.0.dist-info}/METADATA +1 -1
- {aiinbx-0.117.0.dist-info → aiinbx-0.162.0.dist-info}/RECORD +6 -6
- {aiinbx-0.117.0.dist-info → aiinbx-0.162.0.dist-info}/WHEEL +0 -0
- {aiinbx-0.117.0.dist-info → aiinbx-0.162.0.dist-info}/licenses/LICENSE +0 -0
aiinbx/_streaming.py
CHANGED
|
@@ -54,11 +54,12 @@ class Stream(Generic[_T]):
|
|
|
54
54
|
process_data = self._client._process_response_data
|
|
55
55
|
iterator = self._iter_events()
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
try:
|
|
58
|
+
for sse in iterator:
|
|
59
|
+
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
|
|
60
|
+
finally:
|
|
61
|
+
# Ensure the response is closed even if the consumer doesn't read all data
|
|
62
|
+
response.close()
|
|
62
63
|
|
|
63
64
|
def __enter__(self) -> Self:
|
|
64
65
|
return self
|
|
@@ -117,11 +118,12 @@ class AsyncStream(Generic[_T]):
|
|
|
117
118
|
process_data = self._client._process_response_data
|
|
118
119
|
iterator = self._iter_events()
|
|
119
120
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
try:
|
|
122
|
+
async for sse in iterator:
|
|
123
|
+
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
|
|
124
|
+
finally:
|
|
125
|
+
# Ensure the response is closed even if the consumer doesn't read all data
|
|
126
|
+
await response.aclose()
|
|
125
127
|
|
|
126
128
|
async def __aenter__(self) -> Self:
|
|
127
129
|
return self
|
aiinbx/_version.py
CHANGED
|
@@ -9,9 +9,9 @@ aiinbx/_models.py,sha256=3D65psj_C02Mw0K2zpBWrn1khmrvtEXgTTQ6P4r3tUY,31837
|
|
|
9
9
|
aiinbx/_qs.py,sha256=craIKyvPktJ94cvf9zn8j8ekG9dWJzhWv0ob34lIOv4,4828
|
|
10
10
|
aiinbx/_resource.py,sha256=R_-4UEtw4XqdaVP9kNZE-XgrsuRBrQeFB0x4vbgWM_k,1100
|
|
11
11
|
aiinbx/_response.py,sha256=bN_uhJdOtEIu7WonnaRndk73_0N7bpUqEqUx_rZUxH8,28788
|
|
12
|
-
aiinbx/_streaming.py,sha256=
|
|
12
|
+
aiinbx/_streaming.py,sha256=7AWeXwBPMgZiPlU6Z5quvQqDqHDkkt9j38z5L0CBk50,10221
|
|
13
13
|
aiinbx/_types.py,sha256=k1TfzLVNmuxwSkopIgy03zuljyVxSEiekHlbSzCR9U0,7236
|
|
14
|
-
aiinbx/_version.py,sha256=
|
|
14
|
+
aiinbx/_version.py,sha256=M8Y3D27tgL7OqRhp5axOZhp13hxFR4epfHt1bC9yt7A,160
|
|
15
15
|
aiinbx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
aiinbx/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
|
|
17
17
|
aiinbx/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
|
|
@@ -58,7 +58,7 @@ aiinbx/types/thread_retrieve_response.py,sha256=s5jj2iwBfcoVPeybIOJUVwRhvnc_0NdE
|
|
|
58
58
|
aiinbx/types/thread_search_params.py,sha256=ZvlTTw4b_swhuC0VoLnU2QI1hYjROiEAyJ4HJXCrR9M,1939
|
|
59
59
|
aiinbx/types/thread_search_response.py,sha256=lldugJNQuQ5tsD9BrgxoDNojAYs7Ks8iZDMxwhnjogY,908
|
|
60
60
|
aiinbx/types/unwrap_webhook_event.py,sha256=6Hp4c5iHNs2lw3DYgRrgvRFBOmms0NADJ5XExEZrICI,1091
|
|
61
|
-
aiinbx-0.
|
|
62
|
-
aiinbx-0.
|
|
63
|
-
aiinbx-0.
|
|
64
|
-
aiinbx-0.
|
|
61
|
+
aiinbx-0.162.0.dist-info/METADATA,sha256=GEAie_CJy2uaF0SvoIsCqNi0yVcGmSaXvHT_guvj1w0,13209
|
|
62
|
+
aiinbx-0.162.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
63
|
+
aiinbx-0.162.0.dist-info/licenses/LICENSE,sha256=i1rY5G0rFWpuWXv5WPoFrQEOrDWycksLhJxuLBF1tZw,11337
|
|
64
|
+
aiinbx-0.162.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|