uipath 2.0.66__py3-none-any.whl → 2.0.68__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.

@@ -673,7 +673,7 @@ class ContextGroundingService(FolderContext, BaseService):
673
673
  )
674
674
 
675
675
  if folder_key is None:
676
- raise ValueError("Folder key or folder path is required")
676
+ raise ValueError("ContextGrounding: Failed to resolve folder key")
677
677
 
678
678
  return folder_key
679
679
 
@@ -681,4 +681,6 @@ class ContextGroundingService(FolderContext, BaseService):
681
681
  try:
682
682
  return index.data_source.bucketName, index.data_source.folder # type: ignore
683
683
  except AttributeError as e:
684
- raise Exception("Cannot extract bucket data from index") from e
684
+ raise Exception(
685
+ "ContextGrounding: Cannot extract bucket data from index"
686
+ ) from e
@@ -28,23 +28,49 @@ class FolderService(BaseService):
28
28
 
29
29
  @traced(name="folder_retrieve_key", run_type="uipath")
30
30
  def retrieve_key(self, *, folder_path: str) -> Optional[str]:
31
- spec = self._retrieve_spec(folder_path)
32
- response = self.request(
33
- spec.method,
34
- url=spec.endpoint,
35
- params=spec.params,
36
- ).json()
37
-
38
- return next(
39
- (
40
- item["Key"]
41
- for item in response["PageItems"]
42
- if item["FullyQualifiedName"] == folder_path
43
- ),
44
- None,
45
- )
31
+ """Retrieve the folder key by folder path with pagination support.
32
+
33
+ Args:
34
+ folder_path: The fully qualified folder path to search for.
35
+
36
+ Returns:
37
+ The folder key if found, None otherwise.
38
+ """
39
+ skip = 0
40
+ take = 20
41
+
42
+ while True:
43
+ spec = self._retrieve_spec(folder_path, skip=skip, take=take)
44
+ response = self.request(
45
+ spec.method,
46
+ url=spec.endpoint,
47
+ params=spec.params,
48
+ ).json()
49
+
50
+ # Search for the folder in current page
51
+ folder_key = next(
52
+ (
53
+ item["Key"]
54
+ for item in response["PageItems"]
55
+ if item["FullyQualifiedName"] == folder_path
56
+ ),
57
+ None,
58
+ )
59
+
60
+ if folder_key is not None:
61
+ return folder_key
62
+
63
+ page_items = response["PageItems"]
64
+ if len(page_items) < take:
65
+ break
66
+
67
+ skip += take
68
+
69
+ return None
46
70
 
47
- def _retrieve_spec(self, folder_path: str) -> RequestSpec:
71
+ def _retrieve_spec(
72
+ self, folder_path: str, *, skip: int = 0, take: int = 20
73
+ ) -> RequestSpec:
48
74
  folder_name = folder_path.split("/")[-1]
49
75
  return RequestSpec(
50
76
  method="GET",
@@ -53,6 +79,7 @@ class FolderService(BaseService):
53
79
  ),
54
80
  params={
55
81
  "searchText": folder_name,
56
- "take": 1,
82
+ "skip": skip,
83
+ "take": take,
57
84
  },
58
85
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath
3
- Version: 2.0.66
3
+ Version: 2.0.68
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
@@ -52,8 +52,8 @@ uipath/_services/assets_service.py,sha256=acqWogfhZiSO1eeVYqFxmqWGSTmrW46QxI1J0b
52
52
  uipath/_services/attachments_service.py,sha256=FwnagLtgpn_IpQMvo9uj5mmA_rlyTTiRd4IduB6FpaQ,26458
53
53
  uipath/_services/buckets_service.py,sha256=Ikqt1Cgs_o2-2kuzcogcaBkNceSQDXLEe63kzkHzWqk,17374
54
54
  uipath/_services/connections_service.py,sha256=qh-HNL_GJsyPUD0wSJZRF8ZdrTE9l4HrIilmXGK6dDk,4581
55
- uipath/_services/context_grounding_service.py,sha256=zS991jW8C8CLkXvJwB2SuY3edTRG84SUOmiXpKId2Go,24381
56
- uipath/_services/folder_service.py,sha256=h0CWNqF2-8w2QLrfy-D8P3z_qA81Te689OXlFKtnby0,2001
55
+ uipath/_services/context_grounding_service.py,sha256=XHtaL-b3PnbmfTj_na9F-aimW_BmSMThXqKm27fCM10,24438
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
59
59
  uipath/_services/processes_service.py,sha256=b-c4ynjcgS0ymp130r0lI93z7DF989u8HWOmWCux754,5727
@@ -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.66.dist-info/METADATA,sha256=YvHAH6jQRsjeveGyJ8_IarkNOYgTQ4v9fHY_04rtw4E,6304
95
- uipath-2.0.66.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
96
- uipath-2.0.66.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
97
- uipath-2.0.66.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
98
- uipath-2.0.66.dist-info/RECORD,,
94
+ uipath-2.0.68.dist-info/METADATA,sha256=x9iUaU04C7BnYcPgeEWLiue2uYQCrieXe2J32GtKX-s,6304
95
+ uipath-2.0.68.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
96
+ uipath-2.0.68.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
97
+ uipath-2.0.68.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
98
+ uipath-2.0.68.dist-info/RECORD,,