uipath 2.0.59__tar.gz → 2.0.61__tar.gz

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.

Files changed (191) hide show
  1. {uipath-2.0.59 → uipath-2.0.61}/PKG-INFO +1 -1
  2. uipath-2.0.61/docs/hooks.py +20 -0
  3. uipath-2.0.61/docs/overrides/main.html +14 -0
  4. {uipath-2.0.59 → uipath-2.0.61}/mkdocs.yml +4 -1
  5. {uipath-2.0.59 → uipath-2.0.61}/pyproject.toml +1 -1
  6. uipath-2.0.61/src/uipath/_cli/_utils/_constants.py +1 -0
  7. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_utils/_parse_ast.py +29 -48
  8. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/cli_init.py +4 -0
  9. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_services/assets_service.py +83 -106
  10. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_services/buckets_service.py +69 -4
  11. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_services/context_grounding_service.py +5 -1
  12. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_services/processes_service.py +2 -1
  13. uipath-2.0.61/src/uipath/_utils/_infer_bindings.py +46 -0
  14. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_utils/_read_overwrites.py +20 -17
  15. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_utils/constants.py +0 -3
  16. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/tracing/_utils.py +5 -0
  17. uipath-2.0.61/tests/cli/mocks/bindings_script.py +28 -0
  18. {uipath-2.0.59 → uipath-2.0.61}/tests/cli/test_init.py +140 -0
  19. {uipath-2.0.59 → uipath-2.0.61}/tests/conftest.py +1 -0
  20. uipath-2.0.61/tests/sdk/test_bindings_inference.py +54 -0
  21. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/test_overwrites.py +18 -19
  22. {uipath-2.0.59 → uipath-2.0.61}/uv.lock +1 -1
  23. uipath-2.0.59/docs/hooks.py +0 -13
  24. uipath-2.0.59/src/uipath/_utils/_infer_bindings.py +0 -30
  25. {uipath-2.0.59 → uipath-2.0.61}/.cursorrules +0 -0
  26. {uipath-2.0.59 → uipath-2.0.61}/.editorconfig +0 -0
  27. {uipath-2.0.59 → uipath-2.0.61}/.gitattributes +0 -0
  28. {uipath-2.0.59 → uipath-2.0.61}/.github/workflows/cd.yml +0 -0
  29. {uipath-2.0.59 → uipath-2.0.61}/.github/workflows/ci.yml +0 -0
  30. {uipath-2.0.59 → uipath-2.0.61}/.github/workflows/commitlint.yml +0 -0
  31. {uipath-2.0.59 → uipath-2.0.61}/.github/workflows/lint.yml +0 -0
  32. {uipath-2.0.59 → uipath-2.0.61}/.github/workflows/publish-dev.yml +0 -0
  33. {uipath-2.0.59 → uipath-2.0.61}/.github/workflows/publish-docs.yml +0 -0
  34. {uipath-2.0.59 → uipath-2.0.61}/.github/workflows/slack.yml +0 -0
  35. {uipath-2.0.59 → uipath-2.0.61}/.github/workflows/test.yml +0 -0
  36. {uipath-2.0.59 → uipath-2.0.61}/.gitignore +0 -0
  37. {uipath-2.0.59 → uipath-2.0.61}/.pre-commit-config.yaml +0 -0
  38. {uipath-2.0.59 → uipath-2.0.61}/.python-version +0 -0
  39. {uipath-2.0.59 → uipath-2.0.61}/.vscode/extensions.json +0 -0
  40. {uipath-2.0.59 → uipath-2.0.61}/.vscode/settings.json +0 -0
  41. {uipath-2.0.59 → uipath-2.0.61}/CONTRIBUTING.md +0 -0
  42. {uipath-2.0.59 → uipath-2.0.61}/LICENSE +0 -0
  43. {uipath-2.0.59 → uipath-2.0.61}/README.md +0 -0
  44. {uipath-2.0.59 → uipath-2.0.61}/docs/CONTRIBUTING.md +0 -0
  45. {uipath-2.0.59 → uipath-2.0.61}/docs/FAQ.md +0 -0
  46. {uipath-2.0.59 → uipath-2.0.61}/docs/assets/env-preparation-failed-dark.png +0 -0
  47. {uipath-2.0.59 → uipath-2.0.61}/docs/assets/env-preparation-failed-light.png +0 -0
  48. {uipath-2.0.59 → uipath-2.0.61}/docs/assets/favicon.png +0 -0
  49. {uipath-2.0.59 → uipath-2.0.61}/docs/assets/logo-dark.svg +0 -0
  50. {uipath-2.0.59 → uipath-2.0.61}/docs/assets/logo-light.svg +0 -0
  51. {uipath-2.0.59 → uipath-2.0.61}/docs/cli/index.md +0 -0
  52. {uipath-2.0.59 → uipath-2.0.61}/docs/core/actions.md +0 -0
  53. {uipath-2.0.59 → uipath-2.0.61}/docs/core/assets/cloud_env_var_dark.gif +0 -0
  54. {uipath-2.0.59 → uipath-2.0.61}/docs/core/assets/cloud_env_var_light.gif +0 -0
  55. {uipath-2.0.59 → uipath-2.0.61}/docs/core/assets/cloud_env_var_secret_dark.png +0 -0
  56. {uipath-2.0.59 → uipath-2.0.61}/docs/core/assets/cloud_env_var_secret_light.png +0 -0
  57. {uipath-2.0.59 → uipath-2.0.61}/docs/core/assets/copy_path_dark.png +0 -0
  58. {uipath-2.0.59 → uipath-2.0.61}/docs/core/assets/copy_path_light.png +0 -0
  59. {uipath-2.0.59 → uipath-2.0.61}/docs/core/assets.md +0 -0
  60. {uipath-2.0.59 → uipath-2.0.61}/docs/core/attachments.md +0 -0
  61. {uipath-2.0.59 → uipath-2.0.61}/docs/core/buckets.md +0 -0
  62. {uipath-2.0.59 → uipath-2.0.61}/docs/core/connections.md +0 -0
  63. {uipath-2.0.59 → uipath-2.0.61}/docs/core/context_grounding.md +0 -0
  64. {uipath-2.0.59 → uipath-2.0.61}/docs/core/environment_variables.md +0 -0
  65. {uipath-2.0.59 → uipath-2.0.61}/docs/core/getting_started.md +0 -0
  66. {uipath-2.0.59 → uipath-2.0.61}/docs/core/jobs.md +0 -0
  67. {uipath-2.0.59 → uipath-2.0.61}/docs/core/processes.md +0 -0
  68. {uipath-2.0.59 → uipath-2.0.61}/docs/core/queues.md +0 -0
  69. {uipath-2.0.59 → uipath-2.0.61}/docs/core/traced.md +0 -0
  70. {uipath-2.0.59 → uipath-2.0.61}/docs/javascripts/extra.js +0 -0
  71. {uipath-2.0.59 → uipath-2.0.61}/docs/langchain/chat_models.md +0 -0
  72. {uipath-2.0.59 → uipath-2.0.61}/docs/langchain/context_grounding.md +0 -0
  73. {uipath-2.0.59 → uipath-2.0.61}/docs/langchain/human_in_the_loop.md +0 -0
  74. {uipath-2.0.59 → uipath-2.0.61}/docs/overrides/partials/actions.html +0 -0
  75. {uipath-2.0.59 → uipath-2.0.61}/docs/overrides/partials/logo.html +0 -0
  76. {uipath-2.0.59 → uipath-2.0.61}/docs/release_policy.md +0 -0
  77. {uipath-2.0.59 → uipath-2.0.61}/docs/stylesheets/extra.css +0 -0
  78. {uipath-2.0.59 → uipath-2.0.61}/justfile +0 -0
  79. {uipath-2.0.59 → uipath-2.0.61}/py.typed +0 -0
  80. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/__init__.py +0 -0
  81. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/README.md +0 -0
  82. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/__init__.py +0 -0
  83. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_auth/_auth_server.py +0 -0
  84. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_auth/_models.py +0 -0
  85. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_auth/_oidc_utils.py +0 -0
  86. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_auth/_portal_service.py +0 -0
  87. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_auth/_utils.py +0 -0
  88. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_auth/auth_config.json +0 -0
  89. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_auth/index.html +0 -0
  90. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_auth/localhost.crt +0 -0
  91. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_auth/localhost.key +0 -0
  92. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_runtime/_contracts.py +0 -0
  93. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_runtime/_logging.py +0 -0
  94. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_runtime/_runtime.py +0 -0
  95. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
  96. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_templates/.rels.template +0 -0
  97. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
  98. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_templates/main.py.template +0 -0
  99. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
  100. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_utils/_common.py +0 -0
  101. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_utils/_console.py +0 -0
  102. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_utils/_folders.py +0 -0
  103. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_utils/_input_args.py +0 -0
  104. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/_utils/_processes.py +0 -0
  105. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/cli_auth.py +0 -0
  106. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/cli_deploy.py +0 -0
  107. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/cli_invoke.py +0 -0
  108. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/cli_new.py +0 -0
  109. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/cli_pack.py +0 -0
  110. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/cli_publish.py +0 -0
  111. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/cli_run.py +0 -0
  112. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/middlewares.py +0 -0
  113. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_cli/spinner.py +0 -0
  114. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_config.py +0 -0
  115. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_execution_context.py +0 -0
  116. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_folder_context.py +0 -0
  117. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_services/__init__.py +0 -0
  118. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_services/_base_service.py +0 -0
  119. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_services/actions_service.py +0 -0
  120. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_services/api_client.py +0 -0
  121. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_services/attachments_service.py +0 -0
  122. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_services/connections_service.py +0 -0
  123. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_services/folder_service.py +0 -0
  124. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_services/jobs_service.py +0 -0
  125. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_services/llm_gateway_service.py +0 -0
  126. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_services/queues_service.py +0 -0
  127. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_uipath.py +0 -0
  128. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_utils/__init__.py +0 -0
  129. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_utils/_endpoint.py +0 -0
  130. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_utils/_logs.py +0 -0
  131. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_utils/_request_override.py +0 -0
  132. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_utils/_request_spec.py +0 -0
  133. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_utils/_url.py +0 -0
  134. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/_utils/_user_agent.py +0 -0
  135. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/__init__.py +0 -0
  136. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/action_schema.py +0 -0
  137. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/actions.py +0 -0
  138. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/assets.py +0 -0
  139. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/attachment.py +0 -0
  140. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/buckets.py +0 -0
  141. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/connections.py +0 -0
  142. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/context_grounding.py +0 -0
  143. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/context_grounding_index.py +0 -0
  144. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/errors.py +0 -0
  145. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/exceptions.py +0 -0
  146. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/interrupt_models.py +0 -0
  147. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/job.py +0 -0
  148. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/llm_gateway.py +0 -0
  149. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/processes.py +0 -0
  150. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/models/queues.py +0 -0
  151. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/py.typed +0 -0
  152. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/telemetry/__init__.py +0 -0
  153. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/telemetry/_constants.py +0 -0
  154. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/telemetry/_track.py +0 -0
  155. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/tracing/__init__.py +0 -0
  156. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/tracing/_otel_exporters.py +0 -0
  157. {uipath-2.0.59 → uipath-2.0.61}/src/uipath/tracing/_traced.py +0 -0
  158. {uipath-2.0.59 → uipath-2.0.61}/tests/__init__.py +0 -0
  159. {uipath-2.0.59 → uipath-2.0.61}/tests/cli/conftest.py +0 -0
  160. {uipath-2.0.59 → uipath-2.0.61}/tests/cli/mocks/pyproject.toml +0 -0
  161. {uipath-2.0.59 → uipath-2.0.61}/tests/cli/mocks/simple_script.py +0 -0
  162. {uipath-2.0.59 → uipath-2.0.61}/tests/cli/mocks/uipath-mock.json +0 -0
  163. {uipath-2.0.59 → uipath-2.0.61}/tests/cli/mocks/uipath-simple-script-mock.json +0 -0
  164. {uipath-2.0.59 → uipath-2.0.61}/tests/cli/test_invoke.py +0 -0
  165. {uipath-2.0.59 → uipath-2.0.61}/tests/cli/test_new.py +0 -0
  166. {uipath-2.0.59 → uipath-2.0.61}/tests/cli/test_pack.py +0 -0
  167. {uipath-2.0.59 → uipath-2.0.61}/tests/cli/test_publish.py +0 -0
  168. {uipath-2.0.59 → uipath-2.0.61}/tests/cli/test_run.py +0 -0
  169. {uipath-2.0.59 → uipath-2.0.61}/tests/cli/utils/project_details.py +0 -0
  170. {uipath-2.0.59 → uipath-2.0.61}/tests/cli/utils/uipath_json.py +0 -0
  171. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/conftest.py +0 -0
  172. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_actions_service.py +0 -0
  173. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_api_client.py +0 -0
  174. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_assets_service.py +0 -0
  175. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_attachments_service.py +0 -0
  176. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_base_service.py +0 -0
  177. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_buckets_service.py +0 -0
  178. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_connections_service.py +0 -0
  179. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_context_grounding_service.py +0 -0
  180. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_folder_service.py +0 -0
  181. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_jobs_service.py +0 -0
  182. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_llm_integration.py +0 -0
  183. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_llm_service.py +0 -0
  184. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_processes_service.py +0 -0
  185. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_queues_service.py +0 -0
  186. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/services/test_uipath_llm_integration.py +0 -0
  187. {uipath-2.0.59 → uipath-2.0.61}/tests/sdk/test_config.py +0 -0
  188. {uipath-2.0.59 → uipath-2.0.61}/tests/tracing/test_otel_exporters.py +0 -0
  189. {uipath-2.0.59 → uipath-2.0.61}/tests/tracing/test_span_utils.py +0 -0
  190. {uipath-2.0.59 → uipath-2.0.61}/tests/tracing/test_traced.py +0 -0
  191. {uipath-2.0.59 → uipath-2.0.61}/tests/tracing/test_tracing_manager.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath
3
- Version: 2.0.59
3
+ Version: 2.0.61
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
@@ -0,0 +1,20 @@
1
+ import os
2
+ import re
3
+ import shutil
4
+
5
+
6
+ def on_pre_build(config):
7
+ if not os.path.exists("docs/quick_start_images"):
8
+ shutil.copy(
9
+ "docs/plugins/uipath-langchain-python/docs/quick_start.md", "docs/index.md"
10
+ )
11
+ shutil.copytree(
12
+ "docs/plugins/uipath-langchain-python/docs/quick_start_images",
13
+ "docs/quick_start_images",
14
+ )
15
+
16
+
17
+ def on_post_page(output, page, config):
18
+ pattern = r"(<body[^>]*>)"
19
+ replacement = rf"\1\n<noscript><iframe src='https://www.googletagmanager.com/ns.html?id={config['google_tag_manager_id']}' height='0' width='0' style='display:none;visibility:hidden'></iframe></noscript>"
20
+ return re.sub(pattern, replacement, output)
@@ -0,0 +1,14 @@
1
+ {% extends "base.html" %}
2
+
3
+ {% block extrahead %}
4
+ <!-- Google Tag Manager -->
5
+ <script>(function (w, d, s, l, i) {
6
+ w[l] = w[l] || []; w[l].push({
7
+ 'gtm.start':
8
+ new Date().getTime(), event: 'gtm.js'
9
+ }); var f = d.getElementsByTagName(s)[0],
10
+ j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
11
+ 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
12
+ })(window, document, 'script', 'dataLayer', '{{ config.google_tag_manager_id }}');</script>
13
+ <!-- End Google Tag Manager -->
14
+ {% endblock %}
@@ -12,6 +12,8 @@ extra_css:
12
12
  extra_javascript:
13
13
  - javascripts/extra.js
14
14
 
15
+ google_tag_manager_id: GTM-PLLP8P
16
+
15
17
  theme:
16
18
  name: material
17
19
  custom_dir: docs/overrides
@@ -96,7 +98,8 @@ plugins:
96
98
  show_bases: false
97
99
  - mkdocs-simple-hooks:
98
100
  hooks:
99
- on_pre_build: "docs.hooks:redirect_index"
101
+ on_pre_build: "docs.hooks:on_pre_build"
102
+ on_post_page: "docs.hooks:on_post_page"
100
103
  - termynal:
101
104
  prompt_literal_start:
102
105
  - "$"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "uipath"
3
- version = "2.0.59"
3
+ version = "2.0.61"
4
4
  description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
5
5
  readme = { file = "README.md", content-type = "text/markdown" }
6
6
  requires-python = ">=3.10"
@@ -0,0 +1 @@
1
+ BINDINGS_VERSION = "2.2"
@@ -3,10 +3,16 @@
3
3
  import ast
4
4
  import os
5
5
  from dataclasses import dataclass, field
6
- from typing import Any, Dict, List, Optional
7
-
8
- from ..._services import AssetsService, BucketsService, ProcessesService
6
+ from typing import Any, Dict, List, Optional, Tuple
7
+
8
+ from ..._services import (
9
+ AssetsService,
10
+ BucketsService,
11
+ ContextGroundingService,
12
+ ProcessesService,
13
+ )
9
14
  from ..._utils import get_inferred_bindings_names
15
+ from ._constants import BINDINGS_VERSION
10
16
 
11
17
 
12
18
  @dataclass
@@ -33,6 +39,14 @@ service_name_resource_mapping = {
33
39
  "processes": "process",
34
40
  "buckets": "bucket",
35
41
  "connections": "connection",
42
+ "context_grounding": "index",
43
+ }
44
+
45
+ supported_bindings_by_service = {
46
+ "assets": AssetsService,
47
+ "processes": ProcessesService,
48
+ "buckets": BucketsService,
49
+ "context_grounding": ContextGroundingService,
36
50
  }
37
51
 
38
52
 
@@ -67,48 +81,10 @@ class ServiceUsage:
67
81
  def get_component_info(self) -> List[Dict[str, str]]:
68
82
  """Extract component names and folders based on the service type."""
69
83
  result = []
70
-
71
- if self.service_name == "assets":
72
- for call in self.method_calls:
73
- inferred_bindings = get_inferred_bindings_names(AssetsService)
74
- if call.method_name in inferred_bindings:
75
- name = extract_parameter(
76
- call, inferred_bindings[call.method_name]["name"], 0
77
- )
78
- folder_path = extract_parameter(
79
- call, inferred_bindings[call.method_name]["folder_path"]
80
- )
81
- if name:
82
- result.append(
83
- {
84
- "name": name,
85
- "folder": folder_path or "",
86
- "method": call.method_name,
87
- }
88
- )
89
-
90
- elif self.service_name == "processes":
91
- for call in self.method_calls:
92
- inferred_bindings = get_inferred_bindings_names(ProcessesService)
93
- if call.method_name in inferred_bindings:
94
- name = extract_parameter(
95
- call, inferred_bindings[call.method_name]["name"], 0
96
- )
97
- folder_path = extract_parameter(
98
- call, inferred_bindings[call.method_name]["folder_path"]
99
- )
100
- if name:
101
- result.append(
102
- {
103
- "name": name,
104
- "folder": folder_path or "",
105
- "method": call.method_name,
106
- }
107
- )
108
-
109
- elif self.service_name == "buckets":
84
+ has_support, service_cls = self._support_for_bindings_inference()
85
+ if has_support:
110
86
  for call in self.method_calls:
111
- inferred_bindings = get_inferred_bindings_names(BucketsService)
87
+ inferred_bindings = get_inferred_bindings_names(service_cls)
112
88
  if call.method_name in inferred_bindings:
113
89
  name = extract_parameter(
114
90
  call, inferred_bindings[call.method_name]["name"], 0
@@ -125,9 +101,9 @@ class ServiceUsage:
125
101
  }
126
102
  )
127
103
 
104
+ # custom logic for connections bindings
128
105
  elif self.service_name == "connections":
129
106
  for call in self.method_calls:
130
- connection_id = None
131
107
  if len(call.args) > 0:
132
108
  connection_id = call.args[0]
133
109
  if connection_id:
@@ -141,6 +117,12 @@ class ServiceUsage:
141
117
 
142
118
  return result
143
119
 
120
+ def _support_for_bindings_inference(self) -> Tuple[bool, Any]:
121
+ return (
122
+ self.service_name in supported_bindings_by_service,
123
+ supported_bindings_by_service.get(self.service_name, None),
124
+ )
125
+
144
126
 
145
127
  def extract_parameter(
146
128
  method_call: ServiceMethodCall,
@@ -462,11 +444,10 @@ def convert_to_bindings_format(sdk_usage_data):
462
444
  "defaultValue": connection_id,
463
445
  "isExpression": is_connection_id_expression,
464
446
  "displayName": "Connection",
465
- "description": "The connection to be used",
466
447
  }
467
448
  },
468
449
  "metadata": {
469
- "BindingsVersion": "2.1",
450
+ "BindingsVersion": BINDINGS_VERSION,
470
451
  "Connector": connector_name,
471
452
  "UseConnectionService": "True",
472
453
  },
@@ -500,7 +481,7 @@ def convert_to_bindings_format(sdk_usage_data):
500
481
  },
501
482
  "metadata": {
502
483
  "ActivityName": method_name,
503
- "BindingsVersion": "2.1",
484
+ "BindingsVersion": BINDINGS_VERSION,
504
485
  "DisplayLabel": "FullName",
505
486
  },
506
487
  }
@@ -6,6 +6,7 @@ from pathlib import Path
6
6
  from typing import Optional
7
7
 
8
8
  import click
9
+ from dotenv import load_dotenv
9
10
 
10
11
  from ..telemetry import track
11
12
  from ._utils._console import ConsoleLogger
@@ -56,6 +57,9 @@ def get_user_script(directory: str, entrypoint: Optional[str] = None) -> Optiona
56
57
  @track
57
58
  def init(entrypoint: str) -> None:
58
59
  """Create uipath.json with input/output schemas and bindings."""
60
+ current_path = os.getcwd()
61
+ load_dotenv(os.path.join(current_path, ".env"), override=True)
62
+
59
63
  with console.spinner("Initializing UiPath project ..."):
60
64
  current_directory = os.getcwd()
61
65
  generate_env_file(current_directory)
@@ -6,7 +6,7 @@ from .._config import Config
6
6
  from .._execution_context import ExecutionContext
7
7
  from .._folder_context import FolderContext
8
8
  from .._utils import Endpoint, RequestSpec, header_folder, infer_bindings
9
- from .._utils._read_overwrites import OverwritesManager, read_resource_overwrites
9
+ from .._utils._read_overwrites import OverwritesManager
10
10
  from ..models import Asset, UserAsset
11
11
  from ..tracing._traced import traced
12
12
  from ._base_service import BaseService
@@ -24,10 +24,10 @@ class AssetsService(FolderContext, BaseService):
24
24
  self._overwrites_manager = OverwritesManager()
25
25
  self._base_url = "assets"
26
26
 
27
- @infer_bindings()
28
27
  @traced(
29
28
  name="assets_retrieve", run_type="uipath", hide_input=True, hide_output=True
30
29
  )
30
+ @infer_bindings(resource_type="asset")
31
31
  def retrieve(
32
32
  self,
33
33
  name: str,
@@ -61,31 +61,28 @@ class AssetsService(FolderContext, BaseService):
61
61
  except ValueError:
62
62
  is_user = False
63
63
 
64
- with read_resource_overwrites("asset", name, folder_path) as (
65
- overwritten_name,
66
- overwritten_folder_path,
67
- ):
68
- spec = self._retrieve_spec(
69
- overwritten_name,
70
- folder_key=folder_key,
71
- folder_path=overwritten_folder_path,
72
- )
73
- response = self.request(
74
- spec.method,
75
- url=spec.endpoint,
76
- params=spec.params,
77
- content=spec.content,
78
- headers=spec.headers,
79
- )
64
+ spec = self._retrieve_spec(
65
+ name,
66
+ folder_key=folder_key,
67
+ folder_path=folder_path,
68
+ )
69
+ response = self.request(
70
+ spec.method,
71
+ url=spec.endpoint,
72
+ params=spec.params,
73
+ content=spec.content,
74
+ headers=spec.headers,
75
+ )
80
76
 
81
- if is_user:
82
- return UserAsset.model_validate(response.json())
83
- else:
84
- return Asset.model_validate(response.json()["value"][0])
77
+ if is_user:
78
+ return UserAsset.model_validate(response.json())
79
+ else:
80
+ return Asset.model_validate(response.json()["value"][0])
85
81
 
86
82
  @traced(
87
83
  name="assets_retrieve", run_type="uipath", hide_input=True, hide_output=True
88
84
  )
85
+ @infer_bindings(resource_type="asset")
89
86
  async def retrieve_async(
90
87
  self,
91
88
  name: str,
@@ -110,32 +107,28 @@ class AssetsService(FolderContext, BaseService):
110
107
  except ValueError:
111
108
  is_user = False
112
109
 
113
- with read_resource_overwrites("asset", name, folder_path) as (
114
- overwritten_name,
115
- overwritten_folder_path,
116
- ):
117
- spec = self._retrieve_spec(
118
- overwritten_name,
119
- folder_key=folder_key,
120
- folder_path=overwritten_folder_path,
121
- )
122
- response = await self.request_async(
123
- spec.method,
124
- url=spec.endpoint,
125
- params=spec.params,
126
- content=spec.content,
127
- headers=spec.headers,
128
- )
110
+ spec = self._retrieve_spec(
111
+ name,
112
+ folder_key=folder_key,
113
+ folder_path=folder_path,
114
+ )
115
+ response = await self.request_async(
116
+ spec.method,
117
+ url=spec.endpoint,
118
+ params=spec.params,
119
+ content=spec.content,
120
+ headers=spec.headers,
121
+ )
129
122
 
130
- if is_user:
131
- return UserAsset.model_validate(response.json())
132
- else:
133
- return Asset.model_validate(response.json()["value"][0])
123
+ if is_user:
124
+ return UserAsset.model_validate(response.json())
125
+ else:
126
+ return Asset.model_validate(response.json()["value"][0])
134
127
 
135
- @infer_bindings()
136
128
  @traced(
137
129
  name="assets_credential", run_type="uipath", hide_input=True, hide_output=True
138
130
  )
131
+ @infer_bindings(resource_type="asset")
139
132
  def retrieve_credential(
140
133
  self,
141
134
  name: str,
@@ -168,31 +161,27 @@ class AssetsService(FolderContext, BaseService):
168
161
  if not is_user:
169
162
  raise ValueError("This method can only be used for robot assets.")
170
163
 
171
- with read_resource_overwrites("asset", name, folder_path) as (
172
- overwritten_name,
173
- overwritten_folder_path,
174
- ):
175
- spec = self._retrieve_spec(
176
- overwritten_name,
177
- folder_key=folder_key,
178
- folder_path=overwritten_folder_path,
179
- )
164
+ spec = self._retrieve_spec(
165
+ name,
166
+ folder_key=folder_key,
167
+ folder_path=folder_path,
168
+ )
180
169
 
181
- response = self.request(
182
- spec.method,
183
- url=spec.endpoint,
184
- content=spec.content,
185
- headers=spec.headers,
186
- )
170
+ response = self.request(
171
+ spec.method,
172
+ url=spec.endpoint,
173
+ content=spec.content,
174
+ headers=spec.headers,
175
+ )
187
176
 
188
- user_asset = UserAsset.model_validate(response.json())
177
+ user_asset = UserAsset.model_validate(response.json())
189
178
 
190
- return user_asset.credential_password
179
+ return user_asset.credential_password
191
180
 
192
- @infer_bindings()
193
181
  @traced(
194
182
  name="assets_credential", run_type="uipath", hide_input=True, hide_output=True
195
183
  )
184
+ @infer_bindings(resource_type="asset")
196
185
  async def retrieve_credential_async(
197
186
  self,
198
187
  name: str,
@@ -225,26 +214,22 @@ class AssetsService(FolderContext, BaseService):
225
214
  if not is_user:
226
215
  raise ValueError("This method can only be used for robot assets.")
227
216
 
228
- with read_resource_overwrites("asset", name, folder_path) as (
229
- overwritten_name,
230
- overwritten_folder_path,
231
- ):
232
- spec = self._retrieve_spec(
233
- overwritten_name,
234
- folder_key=folder_key,
235
- folder_path=overwritten_folder_path,
236
- )
217
+ spec = self._retrieve_spec(
218
+ name,
219
+ folder_key=folder_key,
220
+ folder_path=folder_path,
221
+ )
237
222
 
238
- response = await self.request_async(
239
- spec.method,
240
- url=spec.endpoint,
241
- content=spec.content,
242
- headers=spec.headers,
243
- )
223
+ response = await self.request_async(
224
+ spec.method,
225
+ url=spec.endpoint,
226
+ content=spec.content,
227
+ headers=spec.headers,
228
+ )
244
229
 
245
- user_asset = UserAsset.model_validate(response.json())
230
+ user_asset = UserAsset.model_validate(response.json())
246
231
 
247
- return user_asset.credential_password
232
+ return user_asset.credential_password
248
233
 
249
234
  @traced(name="assets_update", run_type="uipath", hide_input=True, hide_output=True)
250
235
  def update(
@@ -275,22 +260,18 @@ class AssetsService(FolderContext, BaseService):
275
260
  if not is_user:
276
261
  raise ValueError("This method can only be used for robot assets.")
277
262
 
278
- with read_resource_overwrites("asset", robot_asset.name or "", folder_path) as (
279
- overwritten_name,
280
- overwritten_folder_path,
281
- ):
282
- spec = self._update_spec(
283
- robot_asset, folder_key=folder_key, folder_path=overwritten_folder_path
284
- )
263
+ spec = self._update_spec(
264
+ robot_asset, folder_key=folder_key, folder_path=folder_path
265
+ )
285
266
 
286
- response = self.request(
287
- spec.method,
288
- url=spec.endpoint,
289
- content=spec.content,
290
- headers=spec.headers,
291
- )
267
+ response = self.request(
268
+ spec.method,
269
+ url=spec.endpoint,
270
+ content=spec.content,
271
+ headers=spec.headers,
272
+ )
292
273
 
293
- return response.json()
274
+ return response.json()
294
275
 
295
276
  @traced(name="assets_update", run_type="uipath", hide_input=True, hide_output=True)
296
277
  async def update_async(
@@ -310,22 +291,18 @@ class AssetsService(FolderContext, BaseService):
310
291
  Returns:
311
292
  Response: The HTTP response confirming the update.
312
293
  """
313
- with read_resource_overwrites("asset", robot_asset.name or "", folder_path) as (
314
- overwritten_name,
315
- overwritten_folder_path,
316
- ):
317
- spec = self._update_spec(
318
- robot_asset, folder_key=folder_key, folder_path=overwritten_folder_path
319
- )
294
+ spec = self._update_spec(
295
+ robot_asset, folder_key=folder_key, folder_path=folder_path
296
+ )
320
297
 
321
- response = await self.request_async(
322
- spec.method,
323
- url=spec.endpoint,
324
- content=spec.content,
325
- headers=spec.headers,
326
- )
298
+ response = await self.request_async(
299
+ spec.method,
300
+ url=spec.endpoint,
301
+ content=spec.content,
302
+ headers=spec.headers,
303
+ )
327
304
 
328
- return response.json()
305
+ return response.json()
329
306
 
330
307
  @property
331
308
  def custom_headers(self) -> Dict[str, str]:
@@ -29,6 +29,7 @@ class BucketsService(FolderContext, BaseService):
29
29
  self.custom_client_async = httpx.AsyncClient()
30
30
 
31
31
  @traced(name="buckets_download", run_type="uipath")
32
+ @infer_bindings(resource_type="bucket")
32
33
  def download(
33
34
  self,
34
35
  *,
@@ -83,7 +84,70 @@ class BucketsService(FolderContext, BaseService):
83
84
  file_content = self.custom_client.get(read_uri, headers=headers).content
84
85
  file.write(file_content)
85
86
 
87
+ @traced(name="buckets_download", run_type="uipath")
88
+ @infer_bindings(resource_type="bucket")
89
+ async def download_async(
90
+ self,
91
+ *,
92
+ name: Optional[str] = None,
93
+ key: Optional[str] = None,
94
+ blob_file_path: str,
95
+ destination_path: str,
96
+ folder_key: Optional[str] = None,
97
+ folder_path: Optional[str] = None,
98
+ ) -> None:
99
+ """Download a file from a bucket asynchronously.
100
+
101
+ Args:
102
+ key (Optional[str]): The key of the bucket.
103
+ name (Optional[str]): The name of the bucket.
104
+ blob_file_path (str): The path to the file in the bucket.
105
+ destination_path (str): The local path where the file will be saved.
106
+ folder_key (Optional[str]): The key of the folder where the bucket resides.
107
+ folder_path (Optional[str]): The path of the folder where the bucket resides.
108
+
109
+ Raises:
110
+ ValueError: If neither key nor name is provided.
111
+ Exception: If the bucket with the specified key is not found.
112
+ """
113
+ bucket = await self.retrieve_async(
114
+ name=name, key=key, folder_key=folder_key, folder_path=folder_path
115
+ )
116
+ spec = self._retrieve_readUri_spec(
117
+ bucket.id, blob_file_path, folder_key=folder_key, folder_path=folder_path
118
+ )
119
+ result = (
120
+ await self.request_async(
121
+ spec.method,
122
+ url=spec.endpoint,
123
+ params=spec.params,
124
+ headers=spec.headers,
125
+ )
126
+ ).json()
127
+
128
+ read_uri = result["Uri"]
129
+
130
+ headers = {
131
+ key: value
132
+ for key, value in zip(
133
+ result["Headers"]["Keys"], result["Headers"]["Values"], strict=False
134
+ )
135
+ }
136
+
137
+ with open(destination_path, "wb") as file:
138
+ # the self.request adds auth bearer token
139
+ if result["RequiresAuth"]:
140
+ file_content = (
141
+ await self.request_async("GET", read_uri, headers=headers)
142
+ ).content
143
+ else:
144
+ file_content = (
145
+ await self.custom_client_async.get(read_uri, headers=headers)
146
+ ).content
147
+ file.write(file_content)
148
+
86
149
  @traced(name="buckets_upload", run_type="uipath")
150
+ @infer_bindings(resource_type="bucket")
87
151
  def upload(
88
152
  self,
89
153
  *,
@@ -166,6 +230,7 @@ class BucketsService(FolderContext, BaseService):
166
230
  )
167
231
 
168
232
  @traced(name="buckets_upload", run_type="uipath")
233
+ @infer_bindings(resource_type="bucket")
169
234
  async def upload_async(
170
235
  self,
171
236
  *,
@@ -252,8 +317,8 @@ class BucketsService(FolderContext, BaseService):
252
317
  write_uri, headers=headers, files={"file": file}
253
318
  )
254
319
 
255
- @infer_bindings()
256
320
  @traced(name="buckets_retrieve", run_type="uipath")
321
+ @infer_bindings(resource_type="bucket")
257
322
  def retrieve(
258
323
  self,
259
324
  *,
@@ -300,8 +365,8 @@ class BucketsService(FolderContext, BaseService):
300
365
  raise Exception(f"Bucket with name '{name}' not found") from e
301
366
  return Bucket.model_validate(response)
302
367
 
303
- @infer_bindings()
304
368
  @traced(name="buckets_retrieve", run_type="uipath")
369
+ @infer_bindings(resource_type="bucket")
305
370
  async def retrieve_async(
306
371
  self,
307
372
  *,
@@ -372,7 +437,7 @@ class BucketsService(FolderContext, BaseService):
372
437
 
373
438
  def _retrieve_readUri_spec(
374
439
  self,
375
- bucket_id: str,
440
+ bucket_id: int,
376
441
  blob_file_path: str,
377
442
  folder_key: Optional[str] = None,
378
443
  folder_path: Optional[str] = None,
@@ -390,7 +455,7 @@ class BucketsService(FolderContext, BaseService):
390
455
 
391
456
  def _retrieve_writeri_spec(
392
457
  self,
393
- bucket_id: str,
458
+ bucket_id: int,
394
459
  content_type: str,
395
460
  blob_file_path: str,
396
461
  folder_key: Optional[str] = None,
@@ -8,7 +8,7 @@ from typing_extensions import deprecated
8
8
  from .._config import Config
9
9
  from .._execution_context import ExecutionContext
10
10
  from .._folder_context import FolderContext
11
- from .._utils import Endpoint, RequestSpec, header_folder
11
+ from .._utils import Endpoint, RequestSpec, header_folder, infer_bindings
12
12
  from .._utils.constants import (
13
13
  ORCHESTRATOR_STORAGE_BUCKET_DATA_SOURCE,
14
14
  )
@@ -46,6 +46,7 @@ class ContextGroundingService(FolderContext, BaseService):
46
46
  super().__init__(config=config, execution_context=execution_context)
47
47
 
48
48
  @traced(name="add_to_index", run_type="uipath")
49
+ @infer_bindings(resource_type="index")
49
50
  def add_to_index(
50
51
  self,
51
52
  name: str,
@@ -96,6 +97,7 @@ class ContextGroundingService(FolderContext, BaseService):
96
97
  self.ingest_data(index, folder_key=folder_key, folder_path=folder_path)
97
98
 
98
99
  @traced(name="add_to_index", run_type="uipath")
100
+ @infer_bindings(resource_type="index")
99
101
  async def add_to_index_async(
100
102
  self,
101
103
  name: str,
@@ -151,6 +153,7 @@ class ContextGroundingService(FolderContext, BaseService):
151
153
  )
152
154
 
153
155
  @traced(name="contextgrounding_retrieve", run_type="uipath")
156
+ @infer_bindings(resource_type="index")
154
157
  def retrieve(
155
158
  self,
156
159
  name: str,
@@ -192,6 +195,7 @@ class ContextGroundingService(FolderContext, BaseService):
192
195
  raise Exception("ContextGroundingIndex not found") from e
193
196
 
194
197
  @traced(name="contextgrounding_retrieve", run_type="uipath")
198
+ @infer_bindings(resource_type="index")
195
199
  async def retrieve_async(
196
200
  self,
197
201
  name: str,