uipath 2.0.4__py3-none-any.whl → 2.0.4.dev2__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/_auth/_auth_server.py +0 -2
- uipath/_services/actions_service.py +129 -0
- {uipath-2.0.4.dist-info → uipath-2.0.4.dev2.dist-info}/METADATA +1 -1
- {uipath-2.0.4.dist-info → uipath-2.0.4.dev2.dist-info}/RECORD +7 -7
- {uipath-2.0.4.dist-info → uipath-2.0.4.dev2.dist-info}/WHEEL +0 -0
- {uipath-2.0.4.dist-info → uipath-2.0.4.dev2.dist-info}/entry_points.txt +0 -0
- {uipath-2.0.4.dist-info → uipath-2.0.4.dev2.dist-info}/licenses/LICENSE +0 -0
|
@@ -62,8 +62,6 @@ def make_request_handler_class(state, code_verifier, token_callback, domain):
|
|
|
62
62
|
)
|
|
63
63
|
json.dump(logs, f, indent=2)
|
|
64
64
|
f.write("\n")
|
|
65
|
-
print(logs)
|
|
66
|
-
print("Received log data")
|
|
67
65
|
self.send_response(200)
|
|
68
66
|
self.end_headers()
|
|
69
67
|
self.wfile.write(b"Log received")
|
|
@@ -19,6 +19,18 @@ def _create_spec(
|
|
|
19
19
|
app_key: str = "",
|
|
20
20
|
app_version: int = -1,
|
|
21
21
|
) -> RequestSpec:
|
|
22
|
+
"""Creates a request specification for creating a new action task.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
title: The title of the action task
|
|
26
|
+
data: Optional dictionary containing input data for the action
|
|
27
|
+
action_schema: Optional schema defining the action's inputs, outputs, and outcomes
|
|
28
|
+
app_key: The unique identifier of the application
|
|
29
|
+
app_version: The version of the application
|
|
30
|
+
|
|
31
|
+
Returns:
|
|
32
|
+
RequestSpec: A specification for creating an action task
|
|
33
|
+
"""
|
|
22
34
|
field_list = []
|
|
23
35
|
outcome_list = []
|
|
24
36
|
if action_schema:
|
|
@@ -101,6 +113,14 @@ def _create_spec(
|
|
|
101
113
|
|
|
102
114
|
|
|
103
115
|
def _retrieve_action_spec(action_key: str) -> RequestSpec:
|
|
116
|
+
"""Creates a request specification for retrieving an action by its key.
|
|
117
|
+
|
|
118
|
+
Args:
|
|
119
|
+
action_key: The unique identifier of the action to retrieve
|
|
120
|
+
|
|
121
|
+
Returns:
|
|
122
|
+
RequestSpec: A specification for retrieving an action
|
|
123
|
+
"""
|
|
104
124
|
return RequestSpec(
|
|
105
125
|
method="GET",
|
|
106
126
|
endpoint=Endpoint("/orchestrator_/tasks/GenericTasks/GetTaskDataByKey"),
|
|
@@ -109,6 +129,15 @@ def _retrieve_action_spec(action_key: str) -> RequestSpec:
|
|
|
109
129
|
|
|
110
130
|
|
|
111
131
|
def _assign_task_spec(task_key: str, assignee: str) -> RequestSpec:
|
|
132
|
+
"""Creates a request specification for assigning a task to a user.
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
task_key: The unique identifier of the task
|
|
136
|
+
assignee: The username or email of the user to assign the task to
|
|
137
|
+
|
|
138
|
+
Returns:
|
|
139
|
+
RequestSpec: A specification for assigning a task
|
|
140
|
+
"""
|
|
112
141
|
return RequestSpec(
|
|
113
142
|
method="POST",
|
|
114
143
|
endpoint=Endpoint(
|
|
@@ -121,6 +150,17 @@ def _assign_task_spec(task_key: str, assignee: str) -> RequestSpec:
|
|
|
121
150
|
|
|
122
151
|
|
|
123
152
|
def _retrieve_app_key_spec(app_name: str) -> RequestSpec:
|
|
153
|
+
"""Creates a request specification for retrieving an application's key by its name.
|
|
154
|
+
|
|
155
|
+
Args:
|
|
156
|
+
app_name: The name of the application to retrieve
|
|
157
|
+
|
|
158
|
+
Returns:
|
|
159
|
+
RequestSpec: A specification for retrieving an application key
|
|
160
|
+
|
|
161
|
+
Raises:
|
|
162
|
+
Exception: If the tenant ID environment variable is not set
|
|
163
|
+
"""
|
|
124
164
|
tenant_id = os.getenv(ENV_TENANT_ID, None)
|
|
125
165
|
if not tenant_id:
|
|
126
166
|
raise Exception(f"{ENV_TENANT_ID} env var is not set")
|
|
@@ -142,9 +182,17 @@ class ActionsService(FolderContext, BaseService):
|
|
|
142
182
|
This service provides methods to create and retrieve actions, supporting
|
|
143
183
|
both app-specific and generic actions. It inherits folder context management
|
|
144
184
|
capabilities from FolderContext.
|
|
185
|
+
|
|
186
|
+
Reference: https://docs.uipath.com/automation-cloud/docs/actions
|
|
145
187
|
"""
|
|
146
188
|
|
|
147
189
|
def __init__(self, config: Config, execution_context: ExecutionContext) -> None:
|
|
190
|
+
"""Initializes the ActionsService with configuration and execution context.
|
|
191
|
+
|
|
192
|
+
Args:
|
|
193
|
+
config: The configuration object containing API settings
|
|
194
|
+
execution_context: The execution context for the service
|
|
195
|
+
"""
|
|
148
196
|
super().__init__(config=config, execution_context=execution_context)
|
|
149
197
|
|
|
150
198
|
async def create_async(
|
|
@@ -157,6 +205,25 @@ class ActionsService(FolderContext, BaseService):
|
|
|
157
205
|
app_version: int = -1,
|
|
158
206
|
assignee: str = "",
|
|
159
207
|
) -> Action:
|
|
208
|
+
"""Creates a new action asynchronously.
|
|
209
|
+
|
|
210
|
+
This method creates a new action task in UiPath Orchestrator. The action can be
|
|
211
|
+
either app-specific (using app_name or app_key) or a generic action.
|
|
212
|
+
|
|
213
|
+
Args:
|
|
214
|
+
title: The title of the action
|
|
215
|
+
data: Optional dictionary containing input data for the action
|
|
216
|
+
app_name: The name of the application (if creating an app-specific action)
|
|
217
|
+
app_key: The key of the application (if creating an app-specific action)
|
|
218
|
+
app_version: The version of the application
|
|
219
|
+
assignee: Optional username or email to assign the task to
|
|
220
|
+
|
|
221
|
+
Returns:
|
|
222
|
+
Action: The created action object
|
|
223
|
+
|
|
224
|
+
Raises:
|
|
225
|
+
Exception: If neither app_name nor app_key is provided for app-specific actions
|
|
226
|
+
"""
|
|
160
227
|
(key, action_schema) = (
|
|
161
228
|
(app_key, None)
|
|
162
229
|
if app_key
|
|
@@ -189,6 +256,25 @@ class ActionsService(FolderContext, BaseService):
|
|
|
189
256
|
app_version: int = -1,
|
|
190
257
|
assignee: str = "",
|
|
191
258
|
) -> Action:
|
|
259
|
+
"""Creates a new action synchronously.
|
|
260
|
+
|
|
261
|
+
This method creates a new action task in UiPath Orchestrator. The action can be
|
|
262
|
+
either app-specific (using app_name or app_key) or a generic action.
|
|
263
|
+
|
|
264
|
+
Args:
|
|
265
|
+
title: The title of the action
|
|
266
|
+
data: Optional dictionary containing input data for the action
|
|
267
|
+
app_name: The name of the application (if creating an app-specific action)
|
|
268
|
+
app_key: The key of the application (if creating an app-specific action)
|
|
269
|
+
app_version: The version of the application
|
|
270
|
+
assignee: Optional username or email to assign the task to
|
|
271
|
+
|
|
272
|
+
Returns:
|
|
273
|
+
Action: The created action object
|
|
274
|
+
|
|
275
|
+
Raises:
|
|
276
|
+
Exception: If neither app_name nor app_key is provided for app-specific actions
|
|
277
|
+
"""
|
|
192
278
|
(key, action_schema) = (
|
|
193
279
|
(app_key, None) if app_key else self.__get_app_key_and_schema(app_name)
|
|
194
280
|
)
|
|
@@ -212,6 +298,14 @@ class ActionsService(FolderContext, BaseService):
|
|
|
212
298
|
self,
|
|
213
299
|
action_key: str,
|
|
214
300
|
) -> Action:
|
|
301
|
+
"""Retrieves an action by its key synchronously.
|
|
302
|
+
|
|
303
|
+
Args:
|
|
304
|
+
action_key: The unique identifier of the action to retrieve
|
|
305
|
+
|
|
306
|
+
Returns:
|
|
307
|
+
Action: The retrieved action object
|
|
308
|
+
"""
|
|
215
309
|
spec = _retrieve_action_spec(action_key=action_key)
|
|
216
310
|
response = self.request(spec.method, spec.endpoint, params=spec.params)
|
|
217
311
|
|
|
@@ -221,6 +315,14 @@ class ActionsService(FolderContext, BaseService):
|
|
|
221
315
|
self,
|
|
222
316
|
action_key: str,
|
|
223
317
|
) -> Action:
|
|
318
|
+
"""Retrieves an action by its key asynchronously.
|
|
319
|
+
|
|
320
|
+
Args:
|
|
321
|
+
action_key: The unique identifier of the action to retrieve
|
|
322
|
+
|
|
323
|
+
Returns:
|
|
324
|
+
Action: The retrieved action object
|
|
325
|
+
"""
|
|
224
326
|
spec = _retrieve_action_spec(action_key=action_key)
|
|
225
327
|
response = await self.request_async(
|
|
226
328
|
spec.method, spec.endpoint, params=spec.params
|
|
@@ -231,6 +333,17 @@ class ActionsService(FolderContext, BaseService):
|
|
|
231
333
|
async def __get_app_key_and_schema_async(
|
|
232
334
|
self, app_name: str
|
|
233
335
|
) -> Tuple[str, Optional[ActionSchema]]:
|
|
336
|
+
"""Retrieves an application's key and schema asynchronously.
|
|
337
|
+
|
|
338
|
+
Args:
|
|
339
|
+
app_name: The name of the application to retrieve
|
|
340
|
+
|
|
341
|
+
Returns:
|
|
342
|
+
Tuple[str, Optional[ActionSchema]]: A tuple containing the application key and schema
|
|
343
|
+
|
|
344
|
+
Raises:
|
|
345
|
+
Exception: If app_name is not provided
|
|
346
|
+
"""
|
|
234
347
|
if not app_name:
|
|
235
348
|
raise Exception("appName or appKey is required")
|
|
236
349
|
spec = _retrieve_app_key_spec(app_name=app_name)
|
|
@@ -244,6 +357,17 @@ class ActionsService(FolderContext, BaseService):
|
|
|
244
357
|
def __get_app_key_and_schema(
|
|
245
358
|
self, app_name: str
|
|
246
359
|
) -> Tuple[str, Optional[ActionSchema]]:
|
|
360
|
+
"""Retrieves an application's key and schema synchronously.
|
|
361
|
+
|
|
362
|
+
Args:
|
|
363
|
+
app_name: The name of the application to retrieve
|
|
364
|
+
|
|
365
|
+
Returns:
|
|
366
|
+
Tuple[str, Optional[ActionSchema]]: A tuple containing the application key and schema
|
|
367
|
+
|
|
368
|
+
Raises:
|
|
369
|
+
Exception: If app_name is not provided
|
|
370
|
+
"""
|
|
247
371
|
if not app_name:
|
|
248
372
|
raise Exception("appName or appKey is required")
|
|
249
373
|
|
|
@@ -268,4 +392,9 @@ class ActionsService(FolderContext, BaseService):
|
|
|
268
392
|
|
|
269
393
|
@property
|
|
270
394
|
def custom_headers(self) -> Dict[str, str]:
|
|
395
|
+
"""Gets the custom headers required for folder context.
|
|
396
|
+
|
|
397
|
+
Returns:
|
|
398
|
+
Dict[str, str]: A dictionary of custom headers
|
|
399
|
+
"""
|
|
271
400
|
return self.folder_headers
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath
|
|
3
|
-
Version: 2.0.4
|
|
3
|
+
Version: 2.0.4.dev2
|
|
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
|
|
@@ -14,7 +14,7 @@ uipath/_cli/cli_pack.py,sha256=gV7SKa3H4ftP1fx3cNLlUQs05ogtqBTIkBcgvvsoyj4,11582
|
|
|
14
14
|
uipath/_cli/cli_publish.py,sha256=_b9rehjsbxwkpH5_DtgFUaWWJqcZTg5nate-M5BnE_c,3586
|
|
15
15
|
uipath/_cli/cli_run.py,sha256=dV0a-sx78T0HJHArfZP2M9YhT8d8aOuf-9OdkBqj3fE,4577
|
|
16
16
|
uipath/_cli/middlewares.py,sha256=IiJgjsqrJVKSXx4RcIKHWoH-SqWqpHPbhzkQEybmAos,3937
|
|
17
|
-
uipath/_cli/_auth/_auth_server.py,sha256=
|
|
17
|
+
uipath/_cli/_auth/_auth_server.py,sha256=vrzrE-hDx8exM5p2sFVoT9vKMblOyFWUvFXz-lTXceY,7077
|
|
18
18
|
uipath/_cli/_auth/_models.py,sha256=sYMCfvmprIqnZxStlD_Dxx2bcxgn0Ri4D7uwemwkcNg,948
|
|
19
19
|
uipath/_cli/_auth/_oidc_utils.py,sha256=WaX9jDlXrlX6yD8i8gsocV8ngjaT72Xd1tvsZMmSbco,2127
|
|
20
20
|
uipath/_cli/_auth/_portal_service.py,sha256=G5wiBlinLTar28b4p-d5alje28hSVqfBUDU7fNezpg4,5984
|
|
@@ -36,7 +36,7 @@ uipath/_cli/_utils/_input_args.py,sha256=pyQhEcQXHdFHYTVNzvfWp439aii5StojoptnmCv
|
|
|
36
36
|
uipath/_cli/_utils/_parse_ast.py,sha256=3XVjnhJNnSfjXlitct91VOtqSl0l-sqDpoWww28mMc0,20663
|
|
37
37
|
uipath/_services/__init__.py,sha256=VPbwLDsvN26nWZgvR-8_-tc3i0rk5doqjTJbSrK0nN4,818
|
|
38
38
|
uipath/_services/_base_service.py,sha256=3YClCoZBkVQGNJZGy-4NTk-HGsGA61XtwVQFYv9mwWk,7955
|
|
39
|
-
uipath/_services/actions_service.py,sha256=
|
|
39
|
+
uipath/_services/actions_service.py,sha256=JiQlOoAEWQBqCf7s68G0y5JOBbSvauqaDEiZe4YJwas,13718
|
|
40
40
|
uipath/_services/api_client.py,sha256=1hYLc_90dQzCGnqqirEHpPqvL3Gkv2sSKoeOV_iTmlk,2903
|
|
41
41
|
uipath/_services/assets_service.py,sha256=OdnhlHfEmwA0SQqkXO4XHl3bV26QLgIxj6sFycseZ0g,8647
|
|
42
42
|
uipath/_services/buckets_service.py,sha256=JeSFoEOBeGi-i_aevaMAyu5gpauq1KC_JkANRTmyxEs,8655
|
|
@@ -69,8 +69,8 @@ uipath/models/job.py,sha256=f9L6_kg_VP0dAYvdcz1DWEWzy4NZPdlpHREod0uNK1E,3099
|
|
|
69
69
|
uipath/models/llm_gateway.py,sha256=0sl5Wtve94V14H3AHwmJSoXAhoc-Fai3wJxP8HrnBPg,1994
|
|
70
70
|
uipath/models/processes.py,sha256=Atvfrt6X4TYST3iA62jpS_Uxc3hg6uah11p-RaKZ6dk,2029
|
|
71
71
|
uipath/models/queues.py,sha256=N_s0GKucbyjh0RnO8SxPk6wlRgvq8KIIYsfaoIY46tM,6446
|
|
72
|
-
uipath-2.0.4.dist-info/METADATA,sha256=
|
|
73
|
-
uipath-2.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
74
|
-
uipath-2.0.4.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
|
|
75
|
-
uipath-2.0.4.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
|
|
76
|
-
uipath-2.0.4.dist-info/RECORD,,
|
|
72
|
+
uipath-2.0.4.dev2.dist-info/METADATA,sha256=W9rI_wbmBK-opEkbfwexa7bKY6L-dm1tzT2xaekq8ok,5801
|
|
73
|
+
uipath-2.0.4.dev2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
74
|
+
uipath-2.0.4.dev2.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
|
|
75
|
+
uipath-2.0.4.dev2.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
|
|
76
|
+
uipath-2.0.4.dev2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|