uipath 2.0.53__tar.gz → 2.0.55__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.
- {uipath-2.0.53 → uipath-2.0.55}/.github/workflows/test.yml +9 -1
- {uipath-2.0.53 → uipath-2.0.55}/.gitignore +4 -0
- {uipath-2.0.53 → uipath-2.0.55}/PKG-INFO +1 -1
- uipath-2.0.55/docs/FAQ.md +77 -0
- uipath-2.0.55/docs/assets/env-preparation-failed-dark.png +0 -0
- uipath-2.0.55/docs/assets/env-preparation-failed-light.png +0 -0
- uipath-2.0.55/docs/core/assets/cloud_env_var_dark.gif +0 -0
- uipath-2.0.55/docs/core/assets/cloud_env_var_light.gif +0 -0
- uipath-2.0.55/docs/core/assets/cloud_env_var_secret_dark.png +0 -0
- uipath-2.0.55/docs/core/assets/cloud_env_var_secret_light.png +0 -0
- uipath-2.0.55/docs/core/assets/copy_path_dark.png +0 -0
- uipath-2.0.55/docs/core/assets/copy_path_light.png +0 -0
- uipath-2.0.55/docs/core/attachments.md +86 -0
- uipath-2.0.55/docs/core/environment_variables.md +115 -0
- uipath-2.0.55/docs/core/traced.md +121 -0
- uipath-2.0.55/docs/overrides/partials/actions.html +6 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/stylesheets/extra.css +14 -1
- {uipath-2.0.53 → uipath-2.0.55}/mkdocs.yml +4 -1
- {uipath-2.0.53 → uipath-2.0.55}/pyproject.toml +13 -2
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_auth/_auth_server.py +5 -16
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_auth/auth_config.json +2 -2
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/cli_auth.py +2 -2
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/cli_run.py +2 -2
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_services/__init__.py +2 -0
- uipath-2.0.55/src/uipath/_services/_base_service.py +183 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_services/actions_service.py +12 -4
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_services/api_client.py +2 -36
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_services/assets_service.py +73 -8
- uipath-2.0.55/src/uipath/_services/attachments_service.py +595 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_services/buckets_service.py +4 -9
- uipath-2.0.55/src/uipath/_services/jobs_service.py +521 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_uipath.py +5 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_utils/__init__.py +2 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_utils/_request_override.py +2 -2
- uipath-2.0.55/src/uipath/_utils/_url.py +85 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/__init__.py +4 -1
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/assets.py +22 -0
- uipath-2.0.55/src/uipath/models/attachment.py +28 -0
- uipath-2.0.55/tests/cli/conftest.py +42 -0
- uipath-2.0.55/tests/cli/mocks/pyproject.toml +9 -0
- uipath-2.0.55/tests/cli/mocks/simple_script.py +25 -0
- uipath-2.0.55/tests/cli/mocks/uipath-mock.json +66 -0
- uipath-2.0.55/tests/cli/mocks/uipath-simple-script-mock.json +41 -0
- uipath-2.0.55/tests/cli/test_init.py +196 -0
- uipath-2.0.55/tests/cli/test_invoke.py +168 -0
- uipath-2.0.55/tests/cli/test_new.py +81 -0
- uipath-2.0.55/tests/cli/test_pack.py +326 -0
- uipath-2.0.55/tests/cli/test_publish.py +404 -0
- uipath-2.0.55/tests/cli/test_run.py +231 -0
- uipath-2.0.55/tests/cli/utils/project_details.py +49 -0
- uipath-2.0.55/tests/cli/utils/uipath_json.py +111 -0
- {uipath-2.0.53 → uipath-2.0.55}/tests/conftest.py +15 -0
- uipath-2.0.55/tests/sdk/services/conftest.py +63 -0
- uipath-2.0.55/tests/sdk/services/test_actions_service.py +178 -0
- uipath-2.0.55/tests/sdk/services/test_api_client.py +91 -0
- uipath-2.0.55/tests/sdk/services/test_assets_service.py +279 -0
- uipath-2.0.55/tests/sdk/services/test_attachments_service.py +533 -0
- uipath-2.0.55/tests/sdk/services/test_base_service.py +102 -0
- uipath-2.0.55/tests/sdk/services/test_buckets_service.py +276 -0
- uipath-2.0.55/tests/sdk/services/test_connections_service.py +196 -0
- uipath-2.0.55/tests/sdk/services/test_context_grounding_service.py +335 -0
- uipath-2.0.55/tests/sdk/services/test_folder_service.py +96 -0
- uipath-2.0.55/tests/sdk/services/test_jobs_service.py +475 -0
- {uipath-2.0.53 → uipath-2.0.55}/tests/sdk/services/test_llm_integration.py +27 -1
- uipath-2.0.55/tests/sdk/services/test_processes_service.py +254 -0
- uipath-2.0.55/tests/sdk/services/test_queues_service.py +688 -0
- {uipath-2.0.53 → uipath-2.0.55}/tests/sdk/services/test_uipath_llm_integration.py +3 -0
- {uipath-2.0.53 → uipath-2.0.55}/uv.lock +1784 -1681
- uipath-2.0.53/src/uipath/_services/_base_service.py +0 -261
- uipath-2.0.53/src/uipath/_services/jobs_service.py +0 -267
- uipath-2.0.53/tests/cli/test_init.py +0 -194
- {uipath-2.0.53 → uipath-2.0.55}/.cursorrules +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/.editorconfig +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/.gitattributes +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/.github/workflows/build.yml +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/.github/workflows/cd.yml +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/.github/workflows/ci.yml +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/.github/workflows/commitlint.yml +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/.github/workflows/lint.yml +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/.github/workflows/publish-dev.yml +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/.github/workflows/publish-docs.yml +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/.github/workflows/slack.yml +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/.pre-commit-config.yaml +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/.python-version +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/.vscode/extensions.json +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/.vscode/settings.json +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/CONTRIBUTING.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/LICENSE +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/README.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/CONTRIBUTING.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/assets/favicon.png +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/assets/logo-dark.svg +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/assets/logo-light.svg +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/cli/index.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/core/actions.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/core/assets.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/core/buckets.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/core/connections.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/core/context_grounding.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/core/getting_started.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/core/jobs.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/core/processes.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/core/queues.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/hooks.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/javascripts/extra.js +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/langchain/chat_models.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/langchain/context_grounding.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/langchain/human_in_the_loop.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/overrides/partials/logo.html +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/docs/release_policy.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/justfile +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/py.typed +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/__init__.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/README.md +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/__init__.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_auth/_models.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_auth/_oidc_utils.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_auth/_portal_service.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_auth/_utils.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_auth/index.html +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_auth/localhost.crt +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_auth/localhost.key +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_runtime/_contracts.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_runtime/_logging.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_runtime/_runtime.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_templates/.rels.template +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_templates/main.py.template +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_utils/_common.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_utils/_console.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_utils/_folders.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_utils/_input_args.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_utils/_parse_ast.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/_utils/_processes.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/cli_deploy.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/cli_init.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/cli_invoke.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/cli_new.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/cli_pack.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/cli_publish.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/middlewares.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_cli/spinner.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_config.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_execution_context.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_folder_context.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_services/connections_service.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_services/context_grounding_service.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_services/folder_service.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_services/llm_gateway_service.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_services/processes_service.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_services/queues_service.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_utils/_endpoint.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_utils/_infer_bindings.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_utils/_logs.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_utils/_read_overwrites.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_utils/_request_spec.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_utils/_user_agent.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/_utils/constants.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/action_schema.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/actions.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/buckets.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/connections.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/context_grounding.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/context_grounding_index.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/errors.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/exceptions.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/interrupt_models.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/job.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/llm_gateway.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/processes.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/models/queues.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/py.typed +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/telemetry/__init__.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/telemetry/_constants.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/telemetry/_track.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/tracing/__init__.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/tracing/_otel_exporters.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/tracing/_traced.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/src/uipath/tracing/_utils.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/tests/__init__.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/tests/sdk/services/test_llm_service.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/tests/sdk/test_config.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/tests/sdk/test_overwrites.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/tests/tracing/test_otel_exporters.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/tests/tracing/test_span_utils.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/tests/tracing/test_traced.py +0 -0
- {uipath-2.0.53 → uipath-2.0.55}/tests/tracing/test_tracing_manager.py +0 -0
|
@@ -24,11 +24,19 @@ jobs:
|
|
|
24
24
|
|
|
25
25
|
- name: Run tests
|
|
26
26
|
run: |
|
|
27
|
-
uv run pytest
|
|
27
|
+
uv run pytest --cov-report xml:./coverage/coverage.xml
|
|
28
28
|
env:
|
|
29
29
|
UIPATH_URL: ${{ secrets.UIPATH_URL }}
|
|
30
|
+
UIPATH_BASE_URL: ${{ secrets.UIPATH_BASE_URL }}
|
|
30
31
|
UIPATH_CLIENT_ID: ${{ secrets.UIPATH_CLIENT_ID }}
|
|
31
32
|
UIPATH_CLIENT_SECRET: ${{ secrets.UIPATH_CLIENT_SECRET }}
|
|
32
33
|
UIPATH_ORGANIZATION_ID: ${{ vars.UIPATH_ORGANIZATION_ID }}
|
|
33
34
|
UIPATH_TENANT_ID: ${{ vars.UIPATH_TENANT_ID }}
|
|
34
35
|
|
|
36
|
+
- name: Get Cover
|
|
37
|
+
uses: orgoro/coverage@v3.2
|
|
38
|
+
with:
|
|
39
|
+
coverageFile: ./coverage/coverage.xml
|
|
40
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
41
|
+
if: ${{ github.event_name == 'pull_request_target' }}
|
|
42
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.55
|
|
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,77 @@
|
|
|
1
|
+
# Frequently Asked Questions (FAQ)
|
|
2
|
+
|
|
3
|
+
### Q: Why am I getting a "Failed to prepare environment" error when deploying my python agent to UiPath Cloud Platform?
|
|
4
|
+
|
|
5
|
+
#### Error Message
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"Code": "Serverless.PythonCodedAgent.PrepareEnvironmentError",
|
|
10
|
+
"Title": "Failed to prepare environment",
|
|
11
|
+
"Detail": "An error occurred while installing the package dependencies. Please try again. If the error persists, please contact support.",
|
|
12
|
+
"Category": "System",
|
|
13
|
+
"Status": null
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
#### Visual Example
|
|
18
|
+
|
|
19
|
+
<picture data-light="../assets/env-preparation-failed-light.png" data-dark="../assets/env-preparation-failed-dark.png">
|
|
20
|
+
<source
|
|
21
|
+
media="(prefers-color-scheme: dark)"
|
|
22
|
+
srcset="../assets/env-preparation-failed-dark.png"
|
|
23
|
+
/>
|
|
24
|
+
<img
|
|
25
|
+
src="../assets/env-preparation-failed-light.png"
|
|
26
|
+
/>
|
|
27
|
+
</picture>
|
|
28
|
+
|
|
29
|
+
*Example of the error as it appears in UiPath Cloud Platform*
|
|
30
|
+
|
|
31
|
+
#### Description
|
|
32
|
+
|
|
33
|
+
This error might occur when deploying coded-agents to UiPath Cloud Platform, even though the same project might work correctly in your local environment. The issue is often related to how Python packages are discovered and distributed during the cloud deployment process.
|
|
34
|
+
|
|
35
|
+
#### Common Causes
|
|
36
|
+
|
|
37
|
+
1. Multiple top-level packages or modules in your project structure
|
|
38
|
+
2. Improper configuration or formatting in the pyproject.toml or requirements.txt files
|
|
39
|
+
|
|
40
|
+
#### Solution
|
|
41
|
+
|
|
42
|
+
##### 1. Check Your Project Structure
|
|
43
|
+
|
|
44
|
+
- Ensure your Python files are organized under a non top-level directory (e.g., using the `src` layout)
|
|
45
|
+
- Follow the recommended project structure:
|
|
46
|
+
|
|
47
|
+
```plaintext
|
|
48
|
+
project_root/
|
|
49
|
+
├── src/
|
|
50
|
+
│ └── your_package/
|
|
51
|
+
│ ├── __init__.py
|
|
52
|
+
│ └── your_modules.py
|
|
53
|
+
├── pyproject.toml
|
|
54
|
+
└── setup.cfg/setup.py
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
##### 2. Configure Package Discovery
|
|
58
|
+
|
|
59
|
+
If you need to maintain your current project structure, you can configure custom package discovery in your `pyproject.toml`:
|
|
60
|
+
|
|
61
|
+
```toml
|
|
62
|
+
[tool.setuptools]
|
|
63
|
+
py-modules = []
|
|
64
|
+
packages = ["your_package"]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
##### 3. Verify Dependencies
|
|
68
|
+
|
|
69
|
+
- Ensure all required dependencies are properly listed in your `requirements.txt` or `pyproject.toml`
|
|
70
|
+
|
|
71
|
+
#### Reference
|
|
72
|
+
|
|
73
|
+
For more detailed information about package discovery and configuration, refer to the [official setuptools documentation](https://setuptools.pypa.io/en/latest/userguide/package_discovery.html).
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
*Note: This FAQ will be updated as new information becomes available. If you continue experiencing issues after following these solutions, please contact UiPath support.*
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Attachments Service
|
|
2
|
+
|
|
3
|
+
The `AttachmentsService` provides methods to upload, download, and delete attachments in UiPath Orchestrator. Attachments are files that can be associated with jobs, processes, or other entities, and are managed via the Orchestrator API.
|
|
4
|
+
|
|
5
|
+
> **Reference:** [UiPath Orchestrator Attachments API](https://docs.uipath.com/orchestrator/reference/api-attachments)
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
- Upload files or in-memory content as attachments
|
|
9
|
+
- Download attachments to local files
|
|
10
|
+
- Delete attachments
|
|
11
|
+
- Both synchronous and asynchronous methods
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
### Instantiating the Service
|
|
16
|
+
|
|
17
|
+
The `AttachmentsService` is available as a property on the main `UiPath` client:
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from uipath import UiPath
|
|
21
|
+
|
|
22
|
+
client = UiPath()
|
|
23
|
+
attachments = client.attachments
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Uploading an Attachment
|
|
27
|
+
|
|
28
|
+
You can upload a file from disk or from memory:
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
# Upload from file
|
|
32
|
+
attachment_key = client.attachments.upload(
|
|
33
|
+
name="document.pdf",
|
|
34
|
+
source_path="/path/to/document.pdf",
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
# Upload from memory
|
|
38
|
+
attachment_key = client.attachments.upload(
|
|
39
|
+
name="notes.txt",
|
|
40
|
+
content="Some text content",
|
|
41
|
+
)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### Async Example
|
|
45
|
+
```python
|
|
46
|
+
attachment_key = await client.attachments.upload_async(
|
|
47
|
+
name="notes.txt",
|
|
48
|
+
content="Some text content",
|
|
49
|
+
)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Downloading an Attachment
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
attachment_name = client.attachments.download(
|
|
56
|
+
key=attachment_key,
|
|
57
|
+
destination_path="/path/to/save/document.pdf",
|
|
58
|
+
)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### Async Example
|
|
62
|
+
```python
|
|
63
|
+
attachment_name = await client.attachments.download_async(
|
|
64
|
+
key=attachment_key,
|
|
65
|
+
destination_path="/path/to/save/document.pdf",
|
|
66
|
+
)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Deleting an Attachment
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
client.attachments.delete(key=attachment_key)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
#### Async Example
|
|
76
|
+
```python
|
|
77
|
+
await client.attachments.delete_async(key=attachment_key)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Error Handling
|
|
81
|
+
|
|
82
|
+
All methods raise exceptions on failure. See the SDK error handling documentation for details.
|
|
83
|
+
|
|
84
|
+
## See Also
|
|
85
|
+
- [UiPath Orchestrator Attachments API](https://docs.uipath.com/orchestrator/reference/api-attachments)
|
|
86
|
+
- [Jobs Service](./jobs.md) for listing attachments associated with jobs.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Environment Variables
|
|
2
|
+
|
|
3
|
+
Environment variables are configuration values stored at the operating system level that can be accessed by applications and scripts. They provide a flexible way to configure application behavior without hardcoding values in your source code.
|
|
4
|
+
|
|
5
|
+
Environment variables are loaded in the following order (highest to lowest priority):
|
|
6
|
+
|
|
7
|
+
1. `.env` file in the current directory
|
|
8
|
+
2. System environment variables
|
|
9
|
+
3. Default values in code
|
|
10
|
+
|
|
11
|
+
Example:
|
|
12
|
+
```bash
|
|
13
|
+
# .env file
|
|
14
|
+
UIPATH_FOLDER_PATH=/default/path
|
|
15
|
+
|
|
16
|
+
# System environment
|
|
17
|
+
export UIPATH_FOLDER_PATH=/system/path
|
|
18
|
+
```
|
|
19
|
+
/// warning
|
|
20
|
+
When deploying your agent to production, ensure that all required environment variables (such as API keys and custom configurations) are properly configured in your process settings. This step is crucial for the successful operation of your published package.
|
|
21
|
+
///
|
|
22
|
+
|
|
23
|
+
## Design
|
|
24
|
+
|
|
25
|
+
Create a `.env` file in your project's root directory to manage environment variables locally. When using the `uipath auth` or `uipath new my-agent` commands, this file is automatically created.
|
|
26
|
+
|
|
27
|
+
The `uipath auth` command automatically populates this file with essential variables:
|
|
28
|
+
|
|
29
|
+
- `UIPATH_URL`: Your UiPath Orchestrator instance URL
|
|
30
|
+
- `UIPATH_ACCESS_TOKEN`: Authentication token for API access
|
|
31
|
+
|
|
32
|
+
### Folder Configuration
|
|
33
|
+
Most UiPath services operate within a specific folder context. Configure your folder context using either:
|
|
34
|
+
|
|
35
|
+
- `UIPATH_FOLDER_PATH`: The full path to your target folder
|
|
36
|
+
- `UIPATH_FOLDER_KEY`: The unique identifier for your target folder
|
|
37
|
+
|
|
38
|
+
To obtain the folder path, right-click on the folder in UiPath Orchestrator and select "Copy folder path" from the context menu.
|
|
39
|
+
|
|
40
|
+
<picture data-light="../assets/copy_path_light.png" data-dark="../assets/copy_path_dark.png">
|
|
41
|
+
<source
|
|
42
|
+
media="(prefers-color-scheme: dark)"
|
|
43
|
+
srcset="
|
|
44
|
+
../assets/copy_path_dark.png
|
|
45
|
+
"
|
|
46
|
+
/>
|
|
47
|
+
<img
|
|
48
|
+
src="../assets/copy_path_light.png"
|
|
49
|
+
/>
|
|
50
|
+
</picture>
|
|
51
|
+
|
|
52
|
+
### Telemetry
|
|
53
|
+
To help us improve the developer experience, the CLI collects basic usage data about command invocations. For more details about UiPath's privacy practices, please review the [privacy statement](https://www.uipath.com/legal/privacy-policy).
|
|
54
|
+
|
|
55
|
+
Telemetry is enabled by default. You can opt out by setting the `UIPATH_TELEMETRY_ENABLED` environment variable to `false` in your `.env` file:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
UIPATH_TELEMETRY_ENABLED=false
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Runtime
|
|
62
|
+
|
|
63
|
+
When executing processes or starting jobs, you can configure environment variables through the UiPath Orchestrator interface. For sensitive information like API keys and secrets, we strongly recommend using secret assets instead of environment variables. Secret assets provide enhanced security and better management capabilities.
|
|
64
|
+
|
|
65
|
+
### Secret Assets
|
|
66
|
+
To use a secret asset in your environment variables, reference it using the following format:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
NAME=%ASSETS/your-secret-asset-name%
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
<picture data-light="../assets/cloud_env_var_light.gif" data-dark="../assets/cloud_env_var_dark.gif">
|
|
73
|
+
<source
|
|
74
|
+
media="(prefers-color-scheme: dark)"
|
|
75
|
+
srcset="
|
|
76
|
+
../assets/cloud_env_var_dark.gif
|
|
77
|
+
"
|
|
78
|
+
/>
|
|
79
|
+
<img
|
|
80
|
+
src="../assets/cloud_env_var_light.gif"
|
|
81
|
+
/>
|
|
82
|
+
</picture>
|
|
83
|
+
|
|
84
|
+
### Sensitive Variables
|
|
85
|
+
If you must use environment variables for sensitive information (not recommended), variables containing `API_KEY` or `SECRET` in their names will have their values masked as `****` in the interface for security purposes.
|
|
86
|
+
|
|
87
|
+
<picture data-light="../assets/cloud_env_var_secret_light.png" data-dark="../assets/cloud_env_var_secret_dark.png">
|
|
88
|
+
<source
|
|
89
|
+
media="(prefers-color-scheme: dark)"
|
|
90
|
+
srcset="
|
|
91
|
+
../assets/cloud_env_var_secret_dark.png
|
|
92
|
+
"
|
|
93
|
+
/>
|
|
94
|
+
<img
|
|
95
|
+
src="../assets/cloud_env_var_secret_light.png"
|
|
96
|
+
/>
|
|
97
|
+
</picture>
|
|
98
|
+
|
|
99
|
+
### Log Level
|
|
100
|
+
The `LOG_LEVEL` environment variable controls the verbosity of logging in the Orchestrator UI's Log tab during runtime execution. This setting determines which log messages are displayed in the interface.
|
|
101
|
+
|
|
102
|
+
| Level | Description |
|
|
103
|
+
|-------|-------------|
|
|
104
|
+
| TRACE | Most detailed logging level, shows all possible information |
|
|
105
|
+
| DEBUG | Detailed information for debugging purposes |
|
|
106
|
+
| INFORMATION | General operational information |
|
|
107
|
+
| WARNING | Warning messages for potentially harmful situations |
|
|
108
|
+
| ERROR | Error events that might still allow the application to continue |
|
|
109
|
+
| CRITICAL | Critical events that may lead to application failure |
|
|
110
|
+
| NONE | No logging |
|
|
111
|
+
|
|
112
|
+
The default value is `INFORMATION`
|
|
113
|
+
|
|
114
|
+
### Builtin Variables
|
|
115
|
+
The runtime environment automatically includes certain variables (such as `UIPATH_FOLDER_KEY`, `UIPATH_ROBOT_KEY`), eliminating the need for manual configuration.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Tracing
|
|
2
|
+
|
|
3
|
+
The `traced()` decorator enables automatic tracing of function calls, inputs, and outputs. It is designed to help you monitor, debug, and audit your code by capturing detailed information about function executions, including arguments, return values, and exceptions.
|
|
4
|
+
|
|
5
|
+
You can view the traces of an Orchestrator job by going to the Jobs page, click a job, a side panel will open, and they will be available under the `Trace` tab. These can also be seen in UiPath Maestro when your agent is part of a larger process orchestration.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
Apply the `@traced()` decorator to any function (sync, async, generator, or async generator) to automatically record its execution as a trace span.
|
|
10
|
+
|
|
11
|
+
```python hl_lines="3 7"
|
|
12
|
+
from uipath.tracing._traced import traced
|
|
13
|
+
|
|
14
|
+
@traced()
|
|
15
|
+
def my_function(x, y):
|
|
16
|
+
return x + y
|
|
17
|
+
|
|
18
|
+
@traced(name="custom_span", run_type="my_type")
|
|
19
|
+
async def my_async_function(a, b):
|
|
20
|
+
return a * b
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Parameters
|
|
24
|
+
|
|
25
|
+
| Parameter | Type | Description |
|
|
26
|
+
|------------------|-------------------------------------|---------------------------------------------------------------------------------------------------|
|
|
27
|
+
| name | Optional[str] | Custom name for the trace span. Defaults to the function name. |
|
|
28
|
+
| run_type | Optional[str] | Category for the run (e.g., "uipath"). Useful for filtering traces. |
|
|
29
|
+
| span_type | Optional[str] | Custom type for the span. Defaults to function type (sync/async/generator). |
|
|
30
|
+
| input_processor | Optional[Callable[[dict], dict]] | Function to process/transform inputs before recording. Receives a dict of arguments. |
|
|
31
|
+
| output_processor | Optional[Callable[[Any], Any]] | Function to process/transform outputs before recording. Receives the function's return value. |
|
|
32
|
+
| hide_input | bool | If True, input data is redacted in the trace for privacy/security. |
|
|
33
|
+
| hide_output | bool | If True, output data is redacted in the trace for privacy/security. |
|
|
34
|
+
|
|
35
|
+
## Input and Output Processors
|
|
36
|
+
|
|
37
|
+
Processors allow you to mask, redact, or transform sensitive data before it is recorded in the trace. For example:
|
|
38
|
+
|
|
39
|
+
```python hl_lines="13"
|
|
40
|
+
def mask_inputs(inputs):
|
|
41
|
+
inputs = inputs.copy()
|
|
42
|
+
if 'password' in inputs:
|
|
43
|
+
inputs['password'] = '***REDACTED***'
|
|
44
|
+
return inputs
|
|
45
|
+
|
|
46
|
+
def anonymize_output(output):
|
|
47
|
+
if isinstance(output, dict) and 'email' in output:
|
|
48
|
+
output = output.copy()
|
|
49
|
+
output['email'] = 'anonymous@example.com'
|
|
50
|
+
return output
|
|
51
|
+
|
|
52
|
+
@traced(input_processor=mask_inputs, output_processor=anonymize_output)
|
|
53
|
+
def login(user, password):
|
|
54
|
+
# ...
|
|
55
|
+
return {"email": user + "@example.com"}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Privacy Controls
|
|
59
|
+
|
|
60
|
+
- Set `hide_input=True` to prevent input data from being logged.
|
|
61
|
+
- Set `hide_output=True` to prevent output data from being logged.
|
|
62
|
+
|
|
63
|
+
```python hl_lines="1"
|
|
64
|
+
@traced(hide_input=True, hide_output=True)
|
|
65
|
+
def sensitive_operation(secret):
|
|
66
|
+
...
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Supported Function Types
|
|
70
|
+
|
|
71
|
+
- Regular functions (sync/async)
|
|
72
|
+
- Generator functions (sync/async)
|
|
73
|
+
|
|
74
|
+
## Example with plain python agents
|
|
75
|
+
|
|
76
|
+
When used with plain python agents please call `wait_for_tracers()` at the end of the script to ensure all traces are sent, if this is not called the agent could end without sending all the traces.
|
|
77
|
+
|
|
78
|
+
```python hl_lines="3 8"
|
|
79
|
+
|
|
80
|
+
from uipath.tracing import traced, wait_for_tracers
|
|
81
|
+
|
|
82
|
+
@traced(name="process_payment", run_type="payment", hide_input=True)
|
|
83
|
+
def process_payment(card_number, amount):
|
|
84
|
+
# Sensitive input will not be logged
|
|
85
|
+
return {"status": "success", "amount": amount}
|
|
86
|
+
|
|
87
|
+
@traced()
|
|
88
|
+
def main():
|
|
89
|
+
process_payment()
|
|
90
|
+
|
|
91
|
+
def main_wait_traces():
|
|
92
|
+
try:
|
|
93
|
+
main()
|
|
94
|
+
finally:
|
|
95
|
+
# this needs to be called after the last `traced` function is done
|
|
96
|
+
# to ensure the trace associated with main is saved
|
|
97
|
+
wait_for_tracers()
|
|
98
|
+
|
|
99
|
+
if __name__ == "__main__":
|
|
100
|
+
main_wait_traces()
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## Example with langchain agents
|
|
105
|
+
|
|
106
|
+
When using `uipath-langchain` there is no need to call wait_for_tracers our framework will ensure that is called.
|
|
107
|
+
|
|
108
|
+
```python hl_lines="1"
|
|
109
|
+
@traced()
|
|
110
|
+
def my_custom_traced_function(input: str) -> str:
|
|
111
|
+
return { "x": "some-output" }
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
You can also use `@traceable()` attribute from langchain, but we recommend using `@traced()` attribute instead.
|
|
115
|
+
|
|
116
|
+
```python hl_lines="1"
|
|
117
|
+
@traceable()
|
|
118
|
+
# @traced() ---> do not use both at the same time or it will duplicate spans.
|
|
119
|
+
def my_custom_traced_function(input: str) -> str:
|
|
120
|
+
return { "x": "some-output" }
|
|
121
|
+
```
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{% set title = ("[" + (page.title or config.site_name) + "] Your title here") | urlencode %}
|
|
2
|
+
{% set body = ("Page link:: " + config.site_url + page.url + "\n\n ## My Issue/Suggestion") | urlencode %}
|
|
3
|
+
<a href="https://github.com/UiPath/uipath-python/issues/new?title={{ title }}&body={{ body }}"
|
|
4
|
+
class="md-content__button skip-link-icon report-issue-link">
|
|
5
|
+
Report an issue
|
|
6
|
+
</a>
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
color: #182027 !important;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
.report-issue-link {
|
|
22
|
+
color: #182027 !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
.md-nav__item--section {
|
|
22
26
|
&:after {
|
|
23
27
|
background-color: #182027 !important;
|
|
@@ -51,6 +55,10 @@
|
|
|
51
55
|
color: #ffffff !important;
|
|
52
56
|
}
|
|
53
57
|
|
|
58
|
+
.report-issue-link {
|
|
59
|
+
color: #ffffff !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
54
62
|
.md-nav__item--section {
|
|
55
63
|
&:after {
|
|
56
64
|
background-color: #ffffff !important;
|
|
@@ -77,7 +85,7 @@
|
|
|
77
85
|
opacity: 1 !important;
|
|
78
86
|
}
|
|
79
87
|
|
|
80
|
-
a[href^="https://"]:not(.md-source) {
|
|
88
|
+
a[href^="https://"]:not(.md-source):not(.skip-link-icon) {
|
|
81
89
|
&::after {
|
|
82
90
|
content: "↗";
|
|
83
91
|
font-size: 1em;
|
|
@@ -139,4 +147,9 @@ a[href^="https://"]:not(.md-source) {
|
|
|
139
147
|
width: 25%;
|
|
140
148
|
}
|
|
141
149
|
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.report-issue-link {
|
|
153
|
+
text-decoration: underline;
|
|
154
|
+
text-decoration-style: wavy;
|
|
142
155
|
}
|
|
@@ -59,7 +59,9 @@ nav:
|
|
|
59
59
|
- Sample Agents: https://github.com/UiPath/uipath-langchain-python/tree/main/samples
|
|
60
60
|
- UiPath SDK:
|
|
61
61
|
- Getting Started: core/getting_started.md
|
|
62
|
+
- Environment Variables: core/environment_variables.md
|
|
62
63
|
- CLI Reference: cli/index.md
|
|
64
|
+
- Tracing: core/traced.md
|
|
63
65
|
- Services:
|
|
64
66
|
- Actions: core/actions.md
|
|
65
67
|
- Assets: core/assets.md
|
|
@@ -70,6 +72,7 @@ nav:
|
|
|
70
72
|
- Queues: core/queues.md
|
|
71
73
|
- Processes: core/processes.md
|
|
72
74
|
- How To Contribute: CONTRIBUTING.md
|
|
75
|
+
- FAQ: FAQ.md
|
|
73
76
|
- Release Policy: release_policy.md
|
|
74
77
|
|
|
75
78
|
plugins:
|
|
@@ -134,4 +137,4 @@ markdown_extensions:
|
|
|
134
137
|
alternate_style: true
|
|
135
138
|
- toc:
|
|
136
139
|
title: On this page
|
|
137
|
-
permalink: true
|
|
140
|
+
permalink: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "uipath"
|
|
3
|
-
version = "2.0.
|
|
3
|
+
version = "2.0.55"
|
|
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"
|
|
@@ -59,6 +59,11 @@ dev = [
|
|
|
59
59
|
"mkdocs-click>=0.9.0",
|
|
60
60
|
"pytest-asyncio>=0.26.0",
|
|
61
61
|
"mkdocs-open-in-new-tab>=1.0.8",
|
|
62
|
+
"toml>=0.10.2",
|
|
63
|
+
"inflection>=0.5.1",
|
|
64
|
+
"pytest-httpx>=0.35.0",
|
|
65
|
+
"pytest-trio>=0.8.0",
|
|
66
|
+
"types-toml>=0.10.8",
|
|
62
67
|
]
|
|
63
68
|
|
|
64
69
|
[project.optional-dependencies]
|
|
@@ -115,5 +120,11 @@ warn_required_dynamic_aliases = true
|
|
|
115
120
|
[tool.pytest.ini_options]
|
|
116
121
|
testpaths = ["tests"]
|
|
117
122
|
python_files = "test_*.py"
|
|
118
|
-
addopts = "-ra -q"
|
|
123
|
+
addopts = "-ra -q --cov"
|
|
124
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
119
125
|
|
|
126
|
+
[tool.coverage.report]
|
|
127
|
+
show_missing = true
|
|
128
|
+
|
|
129
|
+
[tool.coverage.run]
|
|
130
|
+
source = ["src"]
|
|
@@ -2,7 +2,6 @@ import http.server
|
|
|
2
2
|
import json
|
|
3
3
|
import os
|
|
4
4
|
import socketserver
|
|
5
|
-
import ssl
|
|
6
5
|
import time
|
|
7
6
|
|
|
8
7
|
import click
|
|
@@ -109,19 +108,15 @@ def make_request_handler_class(state, code_verifier, token_callback, domain):
|
|
|
109
108
|
return SimpleHTTPSRequestHandler
|
|
110
109
|
|
|
111
110
|
|
|
112
|
-
class
|
|
113
|
-
def __init__(self, port=6234
|
|
114
|
-
"""Initialize
|
|
111
|
+
class HTTPServer:
|
|
112
|
+
def __init__(self, port=6234):
|
|
113
|
+
"""Initialize HTTP server with configurable parameters.
|
|
115
114
|
|
|
116
115
|
Args:
|
|
117
116
|
port (int, optional): Port number to run the server on. Defaults to 6234.
|
|
118
|
-
cert_file (str, optional): SSL certificate file. Defaults to "localhost.crt".
|
|
119
|
-
key_file (str, optional): SSL key file. Defaults to "localhost.key".
|
|
120
117
|
"""
|
|
121
118
|
self.current_path = os.path.dirname(os.path.abspath(__file__))
|
|
122
119
|
self.port = port
|
|
123
|
-
self.cert_file = os.path.join(self.current_path, "localhost.crt")
|
|
124
|
-
self.key_file = os.path.join(self.current_path, "localhost.key")
|
|
125
120
|
self.httpd = None
|
|
126
121
|
self.token_data = None
|
|
127
122
|
self.should_shutdown = False
|
|
@@ -136,7 +131,7 @@ class HTTPSServer:
|
|
|
136
131
|
self.should_shutdown = True
|
|
137
132
|
|
|
138
133
|
def create_server(self, state, code_verifier, domain):
|
|
139
|
-
"""Create and configure the
|
|
134
|
+
"""Create and configure the HTTP server.
|
|
140
135
|
|
|
141
136
|
Args:
|
|
142
137
|
state (str): The OAuth state parameter.
|
|
@@ -144,20 +139,14 @@ class HTTPSServer:
|
|
|
144
139
|
domain (str): The domain for authentication.
|
|
145
140
|
|
|
146
141
|
Returns:
|
|
147
|
-
socketserver.TCPServer: The configured
|
|
142
|
+
socketserver.TCPServer: The configured HTTP server.
|
|
148
143
|
"""
|
|
149
|
-
# Create SSL context
|
|
150
|
-
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
|
|
151
|
-
context.load_cert_chain(self.cert_file, self.key_file)
|
|
152
|
-
|
|
153
144
|
# Create server with address reuse
|
|
154
145
|
socketserver.TCPServer.allow_reuse_address = True
|
|
155
146
|
handler = make_request_handler_class(
|
|
156
147
|
state, code_verifier, self.token_received_callback, domain
|
|
157
148
|
)
|
|
158
149
|
self.httpd = socketserver.TCPServer(("", self.port), handler)
|
|
159
|
-
self.httpd.socket = context.wrap_socket(self.httpd.socket, server_side=True)
|
|
160
|
-
|
|
161
150
|
return self.httpd
|
|
162
151
|
|
|
163
152
|
def start(self, state, code_verifier, domain):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"client_id": "36dea5b8-e8bb-423d-8e7b-c808df8f1c00",
|
|
3
|
-
"redirect_uri": "
|
|
3
|
+
"redirect_uri": "http://localhost:__PY_REPLACE_PORT__/oidc/login",
|
|
4
4
|
"scope": "offline_access OrchestratorApiUserAccess ConnectionService DataService DocumentUnderstanding EnterpriseContextService Directory JamJamApi LLMGateway LLMOps OMS RCS.FolderAuthorization",
|
|
5
5
|
"port": 8104
|
|
6
|
-
}
|
|
6
|
+
}
|
|
@@ -8,7 +8,7 @@ import click
|
|
|
8
8
|
from dotenv import load_dotenv
|
|
9
9
|
|
|
10
10
|
from ..telemetry import track
|
|
11
|
-
from ._auth._auth_server import
|
|
11
|
+
from ._auth._auth_server import HTTPServer
|
|
12
12
|
from ._auth._oidc_utils import get_auth_config, get_auth_url
|
|
13
13
|
from ._auth._portal_service import PortalService, select_tenant
|
|
14
14
|
from ._auth._utils import update_auth_file, update_env_file
|
|
@@ -97,7 +97,7 @@ def auth(domain, force: None | bool = False):
|
|
|
97
97
|
auth_url,
|
|
98
98
|
)
|
|
99
99
|
|
|
100
|
-
server =
|
|
100
|
+
server = HTTPServer(port=auth_config["port"])
|
|
101
101
|
token_data = server.start(state, code_verifier, domain)
|
|
102
102
|
|
|
103
103
|
if token_data:
|
|
@@ -42,14 +42,14 @@ def python_run_middleware(
|
|
|
42
42
|
if not entrypoint:
|
|
43
43
|
return MiddlewareResult(
|
|
44
44
|
should_continue=False,
|
|
45
|
-
|
|
45
|
+
error_message="""No entrypoint specified. Please provide a path to a Python script.
|
|
46
46
|
Usage: `uipath run <entrypoint_path> <input_arguments> [-f <input_json_file_path>]`""",
|
|
47
47
|
)
|
|
48
48
|
|
|
49
49
|
if not os.path.exists(entrypoint):
|
|
50
50
|
return MiddlewareResult(
|
|
51
51
|
should_continue=False,
|
|
52
|
-
error_message=f"""
|
|
52
|
+
error_message=f"""Script not found at path {entrypoint}.
|
|
53
53
|
Usage: `uipath run <entrypoint_path> <input_arguments> [-f <input_json_file_path>]`""",
|
|
54
54
|
)
|
|
55
55
|
|