UncountablePythonSDK 0.0.56__py3-none-any.whl → 0.0.57__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.
Potentially problematic release.
This version of UncountablePythonSDK might be problematic. Click here for more details.
- {UncountablePythonSDK-0.0.56.dist-info → UncountablePythonSDK-0.0.57.dist-info}/METADATA +1 -1
- {UncountablePythonSDK-0.0.56.dist-info → UncountablePythonSDK-0.0.57.dist-info}/RECORD +6 -6
- {UncountablePythonSDK-0.0.56.dist-info → UncountablePythonSDK-0.0.57.dist-info}/WHEEL +1 -1
- uncountable/core/client.py +3 -1
- uncountable/core/file_upload.py +12 -2
- {UncountablePythonSDK-0.0.56.dist-info → UncountablePythonSDK-0.0.57.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: UncountablePythonSDK
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.57
|
|
4
4
|
Summary: Uncountable SDK
|
|
5
5
|
Project-URL: Homepage, https://github.com/uncountableinc/uncountable-python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/uncountableinc/uncountable-python-sdk.git
|
|
@@ -74,8 +74,8 @@ uncountable/__init__.py,sha256=8l8XWNCKsu7TG94c-xa2KHpDegvxDC2FyQISdWC763Y,89
|
|
|
74
74
|
uncountable/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
75
|
uncountable/core/__init__.py,sha256=RFv0kO6rKFf1PtBPu83hCGmxqkJamRtsgQ9_-ztw7tA,341
|
|
76
76
|
uncountable/core/async_batch.py,sha256=Gur0VOS0AH2ugwvk65hwoX-iqwQAAyJaejY_LyAZZPo,1210
|
|
77
|
-
uncountable/core/client.py,sha256=
|
|
78
|
-
uncountable/core/file_upload.py,sha256=
|
|
77
|
+
uncountable/core/client.py,sha256=kKd9MvvlSKDWh69iZ6K2IfbLxMMQ8l0tFLk6p0YG6GM,10622
|
|
78
|
+
uncountable/core/file_upload.py,sha256=qR7BBBWVxFNrb1_WICreo3dkZygE9lcE1fmZCQrDZU0,3469
|
|
79
79
|
uncountable/core/types.py,sha256=s2CjqYJpsmbC7xMwxxT7kJ_V9bwokrjjWVVjpMcQpKI,333
|
|
80
80
|
uncountable/core/version.py,sha256=SqQIHLhiVZXQBeOwygS2FRZ4WEO27JmWhse0lKm7fgU,274
|
|
81
81
|
uncountable/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -243,7 +243,7 @@ uncountable/types/api/triggers/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr
|
|
|
243
243
|
uncountable/types/api/triggers/run_trigger.py,sha256=_Rpha9nxXI3Xr17CrGDtofg4HZ81x2lt0rMZ6As0qfE,893
|
|
244
244
|
uncountable/types/api/uploader/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
|
|
245
245
|
uncountable/types/api/uploader/invoke_uploader.py,sha256=Rc77y5q-3R9-SNQgm8P35zKaW2D1Hbtm7PDixnOn1G0,1025
|
|
246
|
-
UncountablePythonSDK-0.0.
|
|
247
|
-
UncountablePythonSDK-0.0.
|
|
248
|
-
UncountablePythonSDK-0.0.
|
|
249
|
-
UncountablePythonSDK-0.0.
|
|
246
|
+
UncountablePythonSDK-0.0.57.dist-info/METADATA,sha256=Ay-ZqQ6b7KqlG96Kv9ZJjBheNvYMCQBgfhkbaRCQLas,1934
|
|
247
|
+
UncountablePythonSDK-0.0.57.dist-info/WHEEL,sha256=uCRv0ZEik_232NlR4YDw4Pv3Ajt5bKvMH13NUU7hFuI,91
|
|
248
|
+
UncountablePythonSDK-0.0.57.dist-info/top_level.txt,sha256=1UVGjAU-6hJY9qw2iJ7nCBeEwZ793AEN5ZfKX9A1uj4,31
|
|
249
|
+
UncountablePythonSDK-0.0.57.dist-info/RECORD,,
|
uncountable/core/client.py
CHANGED
|
@@ -155,10 +155,12 @@ class Client(ClientMethods):
|
|
|
155
155
|
):
|
|
156
156
|
self._auth_details = auth_details
|
|
157
157
|
self._base_url = base_url
|
|
158
|
-
self._file_uploader = FileUploader(self._base_url, self._auth_details)
|
|
159
158
|
self._cfg = config or ClientConfig()
|
|
160
159
|
self._session = requests.Session()
|
|
161
160
|
self._session.verify = not self._cfg.allow_insecure_tls
|
|
161
|
+
self._file_uploader = FileUploader(
|
|
162
|
+
self._base_url, self._auth_details, self._cfg.allow_insecure_tls
|
|
163
|
+
)
|
|
162
164
|
|
|
163
165
|
def _get_response_json(
|
|
164
166
|
self, response: requests.Response, request_id: str
|
uncountable/core/file_upload.py
CHANGED
|
@@ -68,10 +68,17 @@ class UploadFailed(Exception):
|
|
|
68
68
|
class FileUploader:
|
|
69
69
|
_auth_details: AuthDetailsAll
|
|
70
70
|
_base_url: str
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
_allow_insecure_tls: bool
|
|
72
|
+
|
|
73
|
+
def __init__(
|
|
74
|
+
self: Self,
|
|
75
|
+
base_url: str,
|
|
76
|
+
auth_details: AuthDetailsAll,
|
|
77
|
+
allow_insecure_tls: bool = False,
|
|
78
|
+
) -> None:
|
|
73
79
|
self._base_url = base_url
|
|
74
80
|
self._auth_details = auth_details
|
|
81
|
+
self._allow_insecure_tls = allow_insecure_tls
|
|
75
82
|
|
|
76
83
|
async def _upload_file(self: Self, file_upload: FileUpload) -> UploadedFile:
|
|
77
84
|
creation_url = f"{self._base_url}/api/external/file_upload/files"
|
|
@@ -92,6 +99,9 @@ class FileUploader:
|
|
|
92
99
|
file_bytes.bytes_data,
|
|
93
100
|
{"filename": file_bytes.name.encode()},
|
|
94
101
|
client_session=session,
|
|
102
|
+
config=aiotus.RetryConfiguration(
|
|
103
|
+
ssl=False if self._allow_insecure_tls else None
|
|
104
|
+
),
|
|
95
105
|
chunksize=_CHUNK_SIZE,
|
|
96
106
|
)
|
|
97
107
|
if location is None:
|
{UncountablePythonSDK-0.0.56.dist-info → UncountablePythonSDK-0.0.57.dist-info}/top_level.txt
RENAMED
|
File without changes
|