uipath 2.0.69__py3-none-any.whl → 2.0.70__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 uipath might be problematic. Click here for more details.
- uipath/_cli/cli_pack.py +1 -1
- uipath/_services/buckets_service.py +34 -10
- uipath/_services/context_grounding_service.py +4 -4
- {uipath-2.0.69.dist-info → uipath-2.0.70.dist-info}/METADATA +1 -1
- {uipath-2.0.69.dist-info → uipath-2.0.70.dist-info}/RECORD +8 -8
- {uipath-2.0.69.dist-info → uipath-2.0.70.dist-info}/WHEEL +0 -0
- {uipath-2.0.69.dist-info → uipath-2.0.70.dist-info}/entry_points.txt +0 -0
- {uipath-2.0.69.dist-info → uipath-2.0.70.dist-info}/licenses/LICENSE +0 -0
uipath/_cli/cli_pack.py
CHANGED
|
@@ -223,7 +223,7 @@ def pack_fn(projectName, description, entryPoints, version, authors, directory):
|
|
|
223
223
|
file_extensions_included = [".py", ".mermaid", ".json", ".yaml", ".yml"]
|
|
224
224
|
files_included = []
|
|
225
225
|
# Binary files that should be read in binary mode
|
|
226
|
-
binary_extensions = [".exe", ""]
|
|
226
|
+
binary_extensions = [".exe", "", ".xlsx", ".xls"]
|
|
227
227
|
|
|
228
228
|
with open(config_path, "r") as f:
|
|
229
229
|
config_data = json.load(f)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import mimetypes
|
|
1
2
|
from typing import Any, Dict, Optional, Union
|
|
2
3
|
|
|
3
4
|
import httpx
|
|
@@ -154,7 +155,7 @@ class BucketsService(FolderContext, BaseService):
|
|
|
154
155
|
key: Optional[str] = None,
|
|
155
156
|
name: Optional[str] = None,
|
|
156
157
|
blob_file_path: str,
|
|
157
|
-
content_type: str,
|
|
158
|
+
content_type: Optional[str] = None,
|
|
158
159
|
source_path: Optional[str] = None,
|
|
159
160
|
content: Optional[Union[str, bytes]] = None,
|
|
160
161
|
folder_key: Optional[str] = None,
|
|
@@ -166,7 +167,7 @@ class BucketsService(FolderContext, BaseService):
|
|
|
166
167
|
key (Optional[str]): The key of the bucket.
|
|
167
168
|
name (Optional[str]): The name of the bucket.
|
|
168
169
|
blob_file_path (str): The path where the file will be stored in the bucket.
|
|
169
|
-
content_type (str): The MIME type of the file.
|
|
170
|
+
content_type (Optional[str]): The MIME type of the file. For file inputs this is computed dynamically. Default is "application/octet-stream".
|
|
170
171
|
source_path (Optional[str]): The local path of the file to upload.
|
|
171
172
|
content (Optional[Union[str, bytes]]): The content to upload (string or bytes).
|
|
172
173
|
folder_key (Optional[str]): The key of the folder where the bucket resides.
|
|
@@ -185,9 +186,17 @@ class BucketsService(FolderContext, BaseService):
|
|
|
185
186
|
name=name, key=key, folder_key=folder_key, folder_path=folder_path
|
|
186
187
|
)
|
|
187
188
|
|
|
189
|
+
# if source_path, dynamically detect the mime type
|
|
190
|
+
# default to application/octet-stream
|
|
191
|
+
if source_path:
|
|
192
|
+
_content_type, _ = mimetypes.guess_type(source_path)
|
|
193
|
+
else:
|
|
194
|
+
_content_type = content_type
|
|
195
|
+
_content_type = _content_type or "application/octet-stream"
|
|
196
|
+
|
|
188
197
|
spec = self._retrieve_writeri_spec(
|
|
189
198
|
bucket.id,
|
|
190
|
-
|
|
199
|
+
_content_type,
|
|
191
200
|
blob_file_path,
|
|
192
201
|
folder_key=folder_key,
|
|
193
202
|
folder_path=folder_path,
|
|
@@ -209,6 +218,8 @@ class BucketsService(FolderContext, BaseService):
|
|
|
209
218
|
)
|
|
210
219
|
}
|
|
211
220
|
|
|
221
|
+
headers["Content-Type"] = _content_type
|
|
222
|
+
|
|
212
223
|
if content is not None:
|
|
213
224
|
if isinstance(content, str):
|
|
214
225
|
content = content.encode("utf-8")
|
|
@@ -220,13 +231,14 @@ class BucketsService(FolderContext, BaseService):
|
|
|
220
231
|
|
|
221
232
|
if source_path is not None:
|
|
222
233
|
with open(source_path, "rb") as file:
|
|
234
|
+
file_content = file.read()
|
|
223
235
|
if result["RequiresAuth"]:
|
|
224
236
|
self.request(
|
|
225
|
-
"PUT", write_uri, headers=headers,
|
|
237
|
+
"PUT", write_uri, headers=headers, content=file_content
|
|
226
238
|
)
|
|
227
239
|
else:
|
|
228
240
|
self.custom_client.put(
|
|
229
|
-
write_uri, headers=headers,
|
|
241
|
+
write_uri, headers=headers, content=file_content
|
|
230
242
|
)
|
|
231
243
|
|
|
232
244
|
@traced(name="buckets_upload", run_type="uipath")
|
|
@@ -237,7 +249,7 @@ class BucketsService(FolderContext, BaseService):
|
|
|
237
249
|
key: Optional[str] = None,
|
|
238
250
|
name: Optional[str] = None,
|
|
239
251
|
blob_file_path: str,
|
|
240
|
-
content_type: str,
|
|
252
|
+
content_type: Optional[str] = None,
|
|
241
253
|
source_path: Optional[str] = None,
|
|
242
254
|
content: Optional[Union[str, bytes]] = None,
|
|
243
255
|
folder_key: Optional[str] = None,
|
|
@@ -249,8 +261,9 @@ class BucketsService(FolderContext, BaseService):
|
|
|
249
261
|
key (Optional[str]): The key of the bucket.
|
|
250
262
|
name (Optional[str]): The name of the bucket.
|
|
251
263
|
blob_file_path (str): The path where the file will be stored in the bucket.
|
|
252
|
-
content_type (str): The MIME type of the file.
|
|
264
|
+
content_type (Optional[str]): The MIME type of the file. For file inputs this is computed dynamically. Default is "application/octet-stream".
|
|
253
265
|
source_path (str): The local path of the file to upload.
|
|
266
|
+
content (Optional[Union[str, bytes]]): The content to upload (string or bytes).
|
|
254
267
|
folder_key (Optional[str]): The key of the folder where the bucket resides.
|
|
255
268
|
folder_path (Optional[str]): The path of the folder where the bucket resides.
|
|
256
269
|
|
|
@@ -267,9 +280,17 @@ class BucketsService(FolderContext, BaseService):
|
|
|
267
280
|
name=name, key=key, folder_key=folder_key, folder_path=folder_path
|
|
268
281
|
)
|
|
269
282
|
|
|
283
|
+
# if source_path, dynamically detect the mime type
|
|
284
|
+
# default to application/octet-stream
|
|
285
|
+
if source_path:
|
|
286
|
+
_content_type, _ = mimetypes.guess_type(source_path)
|
|
287
|
+
else:
|
|
288
|
+
_content_type = content_type
|
|
289
|
+
_content_type = _content_type or "application/octet-stream"
|
|
290
|
+
|
|
270
291
|
spec = self._retrieve_writeri_spec(
|
|
271
292
|
bucket.id,
|
|
272
|
-
|
|
293
|
+
_content_type,
|
|
273
294
|
blob_file_path,
|
|
274
295
|
folder_key=folder_key,
|
|
275
296
|
folder_path=folder_path,
|
|
@@ -293,6 +314,8 @@ class BucketsService(FolderContext, BaseService):
|
|
|
293
314
|
)
|
|
294
315
|
}
|
|
295
316
|
|
|
317
|
+
headers["Content-Type"] = _content_type
|
|
318
|
+
|
|
296
319
|
if content is not None:
|
|
297
320
|
if isinstance(content, str):
|
|
298
321
|
content = content.encode("utf-8")
|
|
@@ -308,13 +331,14 @@ class BucketsService(FolderContext, BaseService):
|
|
|
308
331
|
|
|
309
332
|
if source_path is not None:
|
|
310
333
|
with open(source_path, "rb") as file:
|
|
334
|
+
file_content = file.read()
|
|
311
335
|
if result["RequiresAuth"]:
|
|
312
336
|
await self.request_async(
|
|
313
|
-
"PUT", write_uri, headers=headers,
|
|
337
|
+
"PUT", write_uri, headers=headers, content=file_content
|
|
314
338
|
)
|
|
315
339
|
else:
|
|
316
340
|
await self.custom_client_async.put(
|
|
317
|
-
write_uri, headers=headers,
|
|
341
|
+
write_uri, headers=headers, content=file_content
|
|
318
342
|
)
|
|
319
343
|
|
|
320
344
|
@traced(name="buckets_retrieve", run_type="uipath")
|
|
@@ -50,8 +50,8 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
50
50
|
def add_to_index(
|
|
51
51
|
self,
|
|
52
52
|
name: str,
|
|
53
|
-
content_type: str,
|
|
54
53
|
blob_file_path: str,
|
|
54
|
+
content_type: Optional[str] = None,
|
|
55
55
|
content: Optional[Union[str, bytes]] = None,
|
|
56
56
|
source_path: Optional[str] = None,
|
|
57
57
|
folder_key: Optional[str] = None,
|
|
@@ -62,7 +62,7 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
62
62
|
|
|
63
63
|
Args:
|
|
64
64
|
name (str): The name of the index to add content to.
|
|
65
|
-
content_type (str): The type of
|
|
65
|
+
content_type (Optional[str]): The MIME type of the file. For file inputs this is computed dynamically. Default is "application/octet-stream".
|
|
66
66
|
blob_file_path (str): The path where the blob will be stored in the storage bucket.
|
|
67
67
|
content (Optional[Union[str, bytes]]): The content to be added, either as a string or bytes.
|
|
68
68
|
source_path (Optional[str]): The source path of the content if it is being uploaded from a file.
|
|
@@ -105,8 +105,8 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
105
105
|
async def add_to_index_async(
|
|
106
106
|
self,
|
|
107
107
|
name: str,
|
|
108
|
-
content_type: str,
|
|
109
108
|
blob_file_path: str,
|
|
109
|
+
content_type: Optional[str] = None,
|
|
110
110
|
content: Optional[Union[str, bytes]] = None,
|
|
111
111
|
source_path: Optional[str] = None,
|
|
112
112
|
folder_key: Optional[str] = None,
|
|
@@ -117,7 +117,7 @@ class ContextGroundingService(FolderContext, BaseService):
|
|
|
117
117
|
|
|
118
118
|
Args:
|
|
119
119
|
name (str): The name of the index to add content to.
|
|
120
|
-
content_type (str): The type of
|
|
120
|
+
content_type (Optional[str]): The MIME type of the file. For file inputs this is computed dynamically. Default is "application/octet-stream".
|
|
121
121
|
blob_file_path (str): The path where the blob will be stored in the storage bucket.
|
|
122
122
|
content (Optional[Union[str, bytes]]): The content to be added, either as a string or bytes.
|
|
123
123
|
source_path (Optional[str]): The source path of the content if it is being uploaded from a file.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.70
|
|
4
4
|
Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
|
|
5
5
|
Project-URL: Homepage, https://uipath.com
|
|
6
6
|
Project-URL: Repository, https://github.com/UiPath/uipath-python
|
|
@@ -11,7 +11,7 @@ uipath/_cli/cli_deploy.py,sha256=KPCmQ0c_NYD5JofSDao5r6QYxHshVCRxlWDVnQvlp5w,645
|
|
|
11
11
|
uipath/_cli/cli_init.py,sha256=JM-0E15sxOLd1o4X2NaiN2FPRuA7XV2lwtCVS0s-v7E,3866
|
|
12
12
|
uipath/_cli/cli_invoke.py,sha256=IjndcDWBpvAqGCRanQU1vfmxaBF8FhyZ7gWuZqwjHrU,3812
|
|
13
13
|
uipath/_cli/cli_new.py,sha256=9378NYUBc9j-qKVXV7oja-jahfJhXBg8zKVyaon7ctY,2102
|
|
14
|
-
uipath/_cli/cli_pack.py,sha256
|
|
14
|
+
uipath/_cli/cli_pack.py,sha256=-Otnb-oI--D7kkRir9P_-PygmHGdblO8JOPrZLm7DIk,15035
|
|
15
15
|
uipath/_cli/cli_publish.py,sha256=Ba0TJ1TSfuQbLU2AIgtM8QWkLHgr4tsAP1CaX12113U,6010
|
|
16
16
|
uipath/_cli/cli_run.py,sha256=zYg-9U6mkofdGsE0IGjYi1dOMlG8CdBxiVGxfFiLq5Y,5882
|
|
17
17
|
uipath/_cli/middlewares.py,sha256=IiJgjsqrJVKSXx4RcIKHWoH-SqWqpHPbhzkQEybmAos,3937
|
|
@@ -50,9 +50,9 @@ uipath/_services/actions_service.py,sha256=LYKvG4VxNGQgZ46AzGK9kI1Txb-YmVvZj5ScP
|
|
|
50
50
|
uipath/_services/api_client.py,sha256=hcof0EMa4-phEHD1WlO7Tdfzq6aL18Sbi2aBE7lJm1w,1821
|
|
51
51
|
uipath/_services/assets_service.py,sha256=acqWogfhZiSO1eeVYqFxmqWGSTmrW46QxI1J0bJe3jo,11918
|
|
52
52
|
uipath/_services/attachments_service.py,sha256=FwnagLtgpn_IpQMvo9uj5mmA_rlyTTiRd4IduB6FpaQ,26458
|
|
53
|
-
uipath/_services/buckets_service.py,sha256=
|
|
53
|
+
uipath/_services/buckets_service.py,sha256=bZHa5jMUIYBR92-sRCQ7kzaZO6VWFh4CxRFvEZ4U_5U,18529
|
|
54
54
|
uipath/_services/connections_service.py,sha256=qh-HNL_GJsyPUD0wSJZRF8ZdrTE9l4HrIilmXGK6dDk,4581
|
|
55
|
-
uipath/_services/context_grounding_service.py,sha256=
|
|
55
|
+
uipath/_services/context_grounding_service.py,sha256=EBf7lIIYz_s1ubf_07OAZXQHjS8kpZ2vqxo4mI3VL-A,25009
|
|
56
56
|
uipath/_services/folder_service.py,sha256=9JqgjKhWD-G_KUnfUTP2BADxL6OK9QNZsBsWZHAULdE,2749
|
|
57
57
|
uipath/_services/jobs_service.py,sha256=CnDd7BM4AMqcMIR1qqu5ohhxf9m0AF4dnGoF4EX38kw,30872
|
|
58
58
|
uipath/_services/llm_gateway_service.py,sha256=ySg3sflIoXmY9K7txlSm7bkuI2qzBT0kAKmGlFBk5KA,12032
|
|
@@ -91,8 +91,8 @@ uipath/tracing/__init__.py,sha256=GKRINyWdHVrDsI-8mrZDLdf0oey6GHGlNZTOADK-kgc,22
|
|
|
91
91
|
uipath/tracing/_otel_exporters.py,sha256=x0PDPmDKJcxashsuehVsSsqBCzRr6WsNFaq_3_HS5F0,3014
|
|
92
92
|
uipath/tracing/_traced.py,sha256=qeVDrds2OUnpdUIA0RhtF0kg2dlAZhyC1RRkI-qivTM,18528
|
|
93
93
|
uipath/tracing/_utils.py,sha256=ZeensQexnw69jVcsVrGyED7mPlAU-L1agDGm6_1A3oc,10388
|
|
94
|
-
uipath-2.0.
|
|
95
|
-
uipath-2.0.
|
|
96
|
-
uipath-2.0.
|
|
97
|
-
uipath-2.0.
|
|
98
|
-
uipath-2.0.
|
|
94
|
+
uipath-2.0.70.dist-info/METADATA,sha256=lIJpyFWC5uV5aZkH5rVU8xKXpz_ZKauidMYQ5ZMZnBc,6304
|
|
95
|
+
uipath-2.0.70.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
96
|
+
uipath-2.0.70.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
|
|
97
|
+
uipath-2.0.70.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
|
|
98
|
+
uipath-2.0.70.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|