indoxrouter 0.1.33__py3-none-any.whl → 0.1.35__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.
- indoxrouter/client.py +4 -17
- {indoxrouter-0.1.33.dist-info → indoxrouter-0.1.35.dist-info}/METADATA +1 -1
- indoxrouter-0.1.35.dist-info/RECORD +9 -0
- indoxrouter-0.1.33.dist-info/RECORD +0 -9
- {indoxrouter-0.1.33.dist-info → indoxrouter-0.1.35.dist-info}/WHEEL +0 -0
- {indoxrouter-0.1.33.dist-info → indoxrouter-0.1.35.dist-info}/licenses/LICENSE +0 -0
- {indoxrouter-0.1.33.dist-info → indoxrouter-0.1.35.dist-info}/top_level.txt +0 -0
indoxrouter/client.py
CHANGED
@@ -300,11 +300,9 @@ class Client:
|
|
300
300
|
if hasattr(self, "access_token") and self.access_token:
|
301
301
|
headers["Authorization"] = f"Bearer {self.access_token}"
|
302
302
|
|
303
|
-
logger.debug(f"Making {method} request to {url}
|
304
|
-
if data
|
305
|
-
|
306
|
-
elif data and not stream:
|
307
|
-
logger.debug(f"Non-streaming request data: {json.dumps(data, indent=2)}")
|
303
|
+
# logger.debug(f"Making {method} request to {url}")
|
304
|
+
# if data:
|
305
|
+
# logger.debug(f"Request data: {json.dumps(data, indent=2)}")
|
308
306
|
|
309
307
|
# Diagnose potential issues with the request (only for non-file uploads)
|
310
308
|
if method == "POST" and data and not files:
|
@@ -337,24 +335,16 @@ class Client:
|
|
337
335
|
|
338
336
|
# Check if we need to reauthenticate (401 Unauthorized) - for both streaming and non-streaming
|
339
337
|
if response.status_code == 401:
|
340
|
-
logger.debug(
|
341
|
-
f"Received 401 for {method} {url} (stream={stream}), attempting to reauthenticate"
|
342
|
-
)
|
338
|
+
logger.debug("Received 401, attempting to reauthenticate")
|
343
339
|
self._authenticate()
|
344
340
|
|
345
341
|
# Update Authorization header with new token if available
|
346
342
|
if hasattr(self, "access_token") and self.access_token:
|
347
343
|
headers["Authorization"] = f"Bearer {self.access_token}"
|
348
344
|
request_params["headers"] = headers
|
349
|
-
logger.debug(
|
350
|
-
f"Updated Authorization header for retry (stream={stream})"
|
351
|
-
)
|
352
345
|
|
353
346
|
# Retry the request after reauthentication
|
354
347
|
response = self.session.request(**request_params)
|
355
|
-
logger.debug(
|
356
|
-
f"Retry response status: {response.status_code} (stream={stream})"
|
357
|
-
)
|
358
348
|
|
359
349
|
# For streaming requests, check if the response is successful before returning
|
360
350
|
if stream:
|
@@ -1425,9 +1415,6 @@ class Client:
|
|
1425
1415
|
|
1426
1416
|
# Check if this is an error chunk
|
1427
1417
|
if "error" in chunk:
|
1428
|
-
logger.debug(
|
1429
|
-
f"Received error chunk during streaming: {chunk}"
|
1430
|
-
)
|
1431
1418
|
# Extract error details
|
1432
1419
|
error_info = chunk["error"]
|
1433
1420
|
if isinstance(error_info, str):
|
@@ -0,0 +1,9 @@
|
|
1
|
+
indoxrouter/__init__.py,sha256=P_2eiiAi-DrkkeeJndQdEMqnVheWzOZIjWkDayrwxuk,1561
|
2
|
+
indoxrouter/client.py,sha256=dDay5HgPcHwSy4svv-xUstPxExHpHRqqQkpiJxfFtyA,56483
|
3
|
+
indoxrouter/constants.py,sha256=rBTeOojwiokuN4F5DEt3DAmryXiCCtT7BBq9Gtc0arg,1590
|
4
|
+
indoxrouter/exceptions.py,sha256=cGlXNF8dd4X8UBWgxTA099nRhEkIjcqE_4iGOlIVVp8,1632
|
5
|
+
indoxrouter-0.1.35.dist-info/licenses/LICENSE,sha256=5n28CfoynFakg-QJIHnecEXcveN8gq-ZwhC0h7ATse0,24232
|
6
|
+
indoxrouter-0.1.35.dist-info/METADATA,sha256=KzCqHEKcMMY42Oy8MPWFBlSs9Gns8iMo5ehrOkuM1F0,5740
|
7
|
+
indoxrouter-0.1.35.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
8
|
+
indoxrouter-0.1.35.dist-info/top_level.txt,sha256=v6FGWkw0QAnXhyYtnXLI1cxzna0iveNvZUotVzCWabM,12
|
9
|
+
indoxrouter-0.1.35.dist-info/RECORD,,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
indoxrouter/__init__.py,sha256=P_2eiiAi-DrkkeeJndQdEMqnVheWzOZIjWkDayrwxuk,1561
|
2
|
-
indoxrouter/client.py,sha256=SPwUewXQ_ui9DI5pmmt3LFOL5gofM3WoZFxBJLBPrF0,57153
|
3
|
-
indoxrouter/constants.py,sha256=rBTeOojwiokuN4F5DEt3DAmryXiCCtT7BBq9Gtc0arg,1590
|
4
|
-
indoxrouter/exceptions.py,sha256=cGlXNF8dd4X8UBWgxTA099nRhEkIjcqE_4iGOlIVVp8,1632
|
5
|
-
indoxrouter-0.1.33.dist-info/licenses/LICENSE,sha256=5n28CfoynFakg-QJIHnecEXcveN8gq-ZwhC0h7ATse0,24232
|
6
|
-
indoxrouter-0.1.33.dist-info/METADATA,sha256=eWkAu1kWSWvyhiC8DXNQpvgipHwlhSs0tkrjhhDdqoE,5740
|
7
|
-
indoxrouter-0.1.33.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
8
|
-
indoxrouter-0.1.33.dist-info/top_level.txt,sha256=v6FGWkw0QAnXhyYtnXLI1cxzna0iveNvZUotVzCWabM,12
|
9
|
-
indoxrouter-0.1.33.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|