uipath 2.0.76__py3-none-any.whl → 2.0.78__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.
- uipath/_cli/_utils/_constants.py +57 -0
- uipath/_cli/cli_pack.py +2 -3
- uipath/_services/attachments_service.py +1 -1
- uipath/tracing/_otel_exporters.py +8 -4
- uipath/utils/_endpoints_manager.py +3 -1
- {uipath-2.0.76.dist-info → uipath-2.0.78.dist-info}/METADATA +1 -1
- {uipath-2.0.76.dist-info → uipath-2.0.78.dist-info}/RECORD +10 -10
- {uipath-2.0.76.dist-info → uipath-2.0.78.dist-info}/WHEEL +0 -0
- {uipath-2.0.76.dist-info → uipath-2.0.78.dist-info}/entry_points.txt +0 -0
- {uipath-2.0.76.dist-info → uipath-2.0.78.dist-info}/licenses/LICENSE +0 -0
uipath/_cli/_utils/_constants.py
CHANGED
@@ -1 +1,58 @@
|
|
1
1
|
BINDINGS_VERSION = "2.2"
|
2
|
+
|
3
|
+
# Binary file extension categories
|
4
|
+
IMAGE_EXTENSIONS = {
|
5
|
+
".png",
|
6
|
+
".jpg",
|
7
|
+
".jpeg",
|
8
|
+
".gif",
|
9
|
+
".bmp",
|
10
|
+
".ico",
|
11
|
+
".tiff",
|
12
|
+
".webp",
|
13
|
+
".svg",
|
14
|
+
}
|
15
|
+
|
16
|
+
DOCUMENT_EXTENSIONS = {".pdf", ".docx", ".pptx", ".xlsx", ".xls"}
|
17
|
+
|
18
|
+
ARCHIVE_EXTENSIONS = {".zip", ".tar", ".gz", ".rar", ".7z", ".bz2", ".xz"}
|
19
|
+
|
20
|
+
MEDIA_EXTENSIONS = {
|
21
|
+
".mp3",
|
22
|
+
".wav",
|
23
|
+
".flac",
|
24
|
+
".aac",
|
25
|
+
".mp4",
|
26
|
+
".avi",
|
27
|
+
".mov",
|
28
|
+
".mkv",
|
29
|
+
".wmv",
|
30
|
+
}
|
31
|
+
|
32
|
+
FONT_EXTENSIONS = {".woff", ".woff2", ".ttf", ".otf", ".eot"}
|
33
|
+
|
34
|
+
EXECUTABLE_EXTENSIONS = {".exe", ".dll", ".so", ".dylib", ".bin"}
|
35
|
+
|
36
|
+
DATABASE_EXTENSIONS = {".db", ".sqlite", ".sqlite3"}
|
37
|
+
|
38
|
+
PYTHON_BINARY_EXTENSIONS = {".pickle", ".pkl"}
|
39
|
+
|
40
|
+
SPECIAL_EXTENSIONS = {""} # Extensionless binary files
|
41
|
+
|
42
|
+
# Pre-compute the union for optimal performance
|
43
|
+
BINARY_EXTENSIONS = (
|
44
|
+
IMAGE_EXTENSIONS
|
45
|
+
| DOCUMENT_EXTENSIONS
|
46
|
+
| ARCHIVE_EXTENSIONS
|
47
|
+
| MEDIA_EXTENSIONS
|
48
|
+
| FONT_EXTENSIONS
|
49
|
+
| EXECUTABLE_EXTENSIONS
|
50
|
+
| DATABASE_EXTENSIONS
|
51
|
+
| PYTHON_BINARY_EXTENSIONS
|
52
|
+
| SPECIAL_EXTENSIONS
|
53
|
+
)
|
54
|
+
|
55
|
+
|
56
|
+
def is_binary_file(file_extension: str) -> bool:
|
57
|
+
"""Determine if a file should be treated as binary."""
|
58
|
+
return file_extension.lower() in BINARY_EXTENSIONS
|
uipath/_cli/cli_pack.py
CHANGED
@@ -17,6 +17,7 @@ except ImportError:
|
|
17
17
|
|
18
18
|
from ..telemetry import track
|
19
19
|
from ._utils._console import ConsoleLogger
|
20
|
+
from ._utils._constants import is_binary_file
|
20
21
|
|
21
22
|
console = ConsoleLogger()
|
22
23
|
|
@@ -265,8 +266,6 @@ def pack_fn(
|
|
265
266
|
# Define the allowlist of file extensions to include
|
266
267
|
file_extensions_included = [".py", ".mermaid", ".json", ".yaml", ".yml"]
|
267
268
|
files_included = []
|
268
|
-
# Binary files that should be read in binary mode
|
269
|
-
binary_extensions = [".exe", "", ".xlsx", ".xls"]
|
270
269
|
|
271
270
|
with open(config_path, "r") as f:
|
272
271
|
config_data = json.load(f)
|
@@ -328,7 +327,7 @@ def pack_fn(
|
|
328
327
|
if file_extension in file_extensions_included or file in files_included:
|
329
328
|
file_path = os.path.join(root, file)
|
330
329
|
rel_path = os.path.relpath(file_path, directory)
|
331
|
-
if file_extension
|
330
|
+
if is_binary_file(file_extension):
|
332
331
|
# Read binary files in binary mode
|
333
332
|
with open(file_path, "rb") as f:
|
334
333
|
z.writestr(f"content/{rel_path}", f.read())
|
@@ -240,7 +240,7 @@ class AttachmentsService(FolderContext, BaseService):
|
|
240
240
|
async for chunk in response.aiter_bytes(chunk_size=8192):
|
241
241
|
file.write(chunk)
|
242
242
|
else:
|
243
|
-
async with httpx.AsyncClient() as client:
|
243
|
+
async with httpx.AsyncClient(**get_httpx_client_kwargs()) as client:
|
244
244
|
async with client.stream(
|
245
245
|
"GET", download_uri, headers=headers
|
246
246
|
) as response:
|
@@ -4,13 +4,15 @@ import os
|
|
4
4
|
import time
|
5
5
|
from typing import Any, Dict, Sequence
|
6
6
|
|
7
|
-
|
7
|
+
import httpx
|
8
8
|
from opentelemetry.sdk.trace import ReadableSpan
|
9
9
|
from opentelemetry.sdk.trace.export import (
|
10
10
|
SpanExporter,
|
11
11
|
SpanExportResult,
|
12
12
|
)
|
13
13
|
|
14
|
+
from uipath._utils._ssl_context import get_httpx_client_kwargs
|
15
|
+
|
14
16
|
from ._utils import _SpanUtils
|
15
17
|
|
16
18
|
logger = logging.getLogger(__name__)
|
@@ -19,9 +21,9 @@ logger = logging.getLogger(__name__)
|
|
19
21
|
class LlmOpsHttpExporter(SpanExporter):
|
20
22
|
"""An OpenTelemetry span exporter that sends spans to UiPath LLM Ops."""
|
21
23
|
|
22
|
-
def __init__(self, **
|
24
|
+
def __init__(self, **client_kwargs):
|
23
25
|
"""Initialize the exporter with the base URL and authentication token."""
|
24
|
-
super().__init__(**
|
26
|
+
super().__init__(**client_kwargs)
|
25
27
|
self.base_url = self._get_base_url()
|
26
28
|
self.auth_token = os.environ.get("UIPATH_ACCESS_TOKEN")
|
27
29
|
self.headers = {
|
@@ -29,7 +31,9 @@ class LlmOpsHttpExporter(SpanExporter):
|
|
29
31
|
"Authorization": f"Bearer {self.auth_token}",
|
30
32
|
}
|
31
33
|
|
32
|
-
|
34
|
+
client_kwargs = get_httpx_client_kwargs()
|
35
|
+
|
36
|
+
self.http_client = httpx.Client(**client_kwargs, headers=self.headers)
|
33
37
|
|
34
38
|
def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult:
|
35
39
|
"""Export spans to UiPath LLM Ops."""
|
@@ -5,6 +5,8 @@ from typing import Optional
|
|
5
5
|
|
6
6
|
import httpx
|
7
7
|
|
8
|
+
from uipath._utils._ssl_context import get_httpx_client_kwargs
|
9
|
+
|
8
10
|
loggger = logging.getLogger(__name__)
|
9
11
|
|
10
12
|
|
@@ -56,7 +58,7 @@ class EndpointManager:
|
|
56
58
|
def _check_agenthub(cls) -> bool:
|
57
59
|
"""Perform the actual check for AgentHub capabilities."""
|
58
60
|
try:
|
59
|
-
with httpx.Client() as http_client:
|
61
|
+
with httpx.Client(**get_httpx_client_kwargs()) as http_client:
|
60
62
|
base_url = os.getenv("UIPATH_URL", "")
|
61
63
|
capabilities_url = f"{base_url.rstrip('/')}/{UiPathEndpoints.AH_CAPABILITIES_ENDPOINT.value}"
|
62
64
|
loggger.debug(f"Checking AgentHub capabilities at {capabilities_url}")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: uipath
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.78
|
4
4
|
Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
|
5
5
|
Project-URL: Homepage, https://uipath.com
|
6
6
|
Project-URL: Repository, https://github.com/UiPath/uipath-python
|
@@ -11,7 +11,7 @@ uipath/_cli/cli_deploy.py,sha256=KPCmQ0c_NYD5JofSDao5r6QYxHshVCRxlWDVnQvlp5w,645
|
|
11
11
|
uipath/_cli/cli_init.py,sha256=SmB7VplpXRSa5sgqgzojNsZDw0zfsEi2TfkMx3eQpTo,5132
|
12
12
|
uipath/_cli/cli_invoke.py,sha256=FurosrZNGlmANIrplKWhw3EQ1b46ph5Z2rPwVaYJgmc,4001
|
13
13
|
uipath/_cli/cli_new.py,sha256=9378NYUBc9j-qKVXV7oja-jahfJhXBg8zKVyaon7ctY,2102
|
14
|
-
uipath/_cli/cli_pack.py,sha256=
|
14
|
+
uipath/_cli/cli_pack.py,sha256=EcoF__1cihLTYwIVtuair-hQPc3fRG9nypLbU31MRqc,20984
|
15
15
|
uipath/_cli/cli_publish.py,sha256=QT17JTClAyLve6ZjB-WvQaJ-j4DdmNneV_eDRyXjeeQ,6578
|
16
16
|
uipath/_cli/cli_run.py,sha256=zYg-9U6mkofdGsE0IGjYi1dOMlG8CdBxiVGxfFiLq5Y,5882
|
17
17
|
uipath/_cli/middlewares.py,sha256=f7bVODO9tgdtWNepG5L58-B-VgBSU6Ek2tIU6wLz0xA,4905
|
@@ -38,7 +38,7 @@ uipath/_cli/_templates/main.py.template,sha256=QB62qX5HKDbW4lFskxj7h9uuxBITnTWqu
|
|
38
38
|
uipath/_cli/_templates/package.nuspec.template,sha256=YZyLc-u_EsmIoKf42JsLQ55OGeFmb8VkIU2VF7DFbtw,359
|
39
39
|
uipath/_cli/_utils/_common.py,sha256=wQ0a_lGj0bsuNvwxUfnLwg6T3IdatdfkrPcZMoufJNU,2058
|
40
40
|
uipath/_cli/_utils/_console.py,sha256=rj4V3yeR1wnJzFTHnaE6wcY9OoJV-PiIQnLg_p62ClQ,6664
|
41
|
-
uipath/_cli/_utils/_constants.py,sha256=
|
41
|
+
uipath/_cli/_utils/_constants.py,sha256=9mRv_ZQoEPfvtTMipraQmYMJeCxcaLL7w8cYy4gJoQE,1225
|
42
42
|
uipath/_cli/_utils/_debug.py,sha256=XlMkjtXT6hqyn7huioLDaVSYqo9fyWCvTkqEJh_ZEGw,1598
|
43
43
|
uipath/_cli/_utils/_folders.py,sha256=UVJcKPfPAVR5HF4AP6EXdlNVcfEF1v5pwGCpoAgBY34,1155
|
44
44
|
uipath/_cli/_utils/_input_args.py,sha256=pyQhEcQXHdFHYTVNzvfWp439aii5StojoptnmCv5lfs,4094
|
@@ -50,7 +50,7 @@ uipath/_services/_base_service.py,sha256=7ZZDMC1TQkVk7pp-1T4a4sJOBI6O98_y9QrHN5y
|
|
50
50
|
uipath/_services/actions_service.py,sha256=LYKvG4VxNGQgZ46AzGK9kI1Txb-YmVvZj5ScPOue8Ls,15989
|
51
51
|
uipath/_services/api_client.py,sha256=hcof0EMa4-phEHD1WlO7Tdfzq6aL18Sbi2aBE7lJm1w,1821
|
52
52
|
uipath/_services/assets_service.py,sha256=acqWogfhZiSO1eeVYqFxmqWGSTmrW46QxI1J0bJe3jo,11918
|
53
|
-
uipath/_services/attachments_service.py,sha256=
|
53
|
+
uipath/_services/attachments_service.py,sha256=NPQYK7CGjfBaNT_1S5vEAfODmOChTbQZforllFM2ofU,26678
|
54
54
|
uipath/_services/buckets_service.py,sha256=5s8tuivd7GUZYj774DDUYTa0axxlUuesc4EBY1V5sdk,18496
|
55
55
|
uipath/_services/connections_service.py,sha256=qh-HNL_GJsyPUD0wSJZRF8ZdrTE9l4HrIilmXGK6dDk,4581
|
56
56
|
uipath/_services/context_grounding_service.py,sha256=EBf7lIIYz_s1ubf_07OAZXQHjS8kpZ2vqxo4mI3VL-A,25009
|
@@ -90,13 +90,13 @@ uipath/telemetry/__init__.py,sha256=Wna32UFzZR66D-RzTKlPWlvji9i2HJb82NhHjCCXRjY,
|
|
90
90
|
uipath/telemetry/_constants.py,sha256=z7taKsKM3CrMEa6gXBgK8otumT2dIXrw7WXc0XE9zYA,680
|
91
91
|
uipath/telemetry/_track.py,sha256=v0e3hgwtetMsUco4yosBzNU00Ek5SI9RxUTumrTTNyo,3872
|
92
92
|
uipath/tracing/__init__.py,sha256=GKRINyWdHVrDsI-8mrZDLdf0oey6GHGlNZTOADK-kgc,224
|
93
|
-
uipath/tracing/_otel_exporters.py,sha256=
|
93
|
+
uipath/tracing/_otel_exporters.py,sha256=X7cnuGqvxGbACZuFD2XYTWXwIse8pokOEAjeTPE6DCQ,3158
|
94
94
|
uipath/tracing/_traced.py,sha256=qeVDrds2OUnpdUIA0RhtF0kg2dlAZhyC1RRkI-qivTM,18528
|
95
95
|
uipath/tracing/_utils.py,sha256=ZeensQexnw69jVcsVrGyED7mPlAU-L1agDGm6_1A3oc,10388
|
96
96
|
uipath/utils/__init__.py,sha256=VD-KXFpF_oWexFg6zyiWMkxl2HM4hYJMIUDZ1UEtGx0,105
|
97
|
-
uipath/utils/_endpoints_manager.py,sha256=
|
98
|
-
uipath-2.0.
|
99
|
-
uipath-2.0.
|
100
|
-
uipath-2.0.
|
101
|
-
uipath-2.0.
|
102
|
-
uipath-2.0.
|
97
|
+
uipath/utils/_endpoints_manager.py,sha256=7k3DQUrN-TE7MqPVcASqg_f-Nuu9FrxNzv0wD0LXr0Q,3861
|
98
|
+
uipath-2.0.78.dist-info/METADATA,sha256=EL02EWvU6BKRXMSPQ2YAdA28c8zkYckJoo0-K953-1E,6462
|
99
|
+
uipath-2.0.78.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
100
|
+
uipath-2.0.78.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
|
101
|
+
uipath-2.0.78.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
|
102
|
+
uipath-2.0.78.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|