atlan-application-sdk-api 3.57.0__tar.gz → 3.58.0__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.
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/.gitignore +6 -1
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/PKG-INFO +3 -3
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/clients/base.py +84 -1
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/__init__.py +3 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/aws_utils.py +47 -2
- atlan_application_sdk_api-3.58.0/application_sdk/common/concurrency.py +53 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/errors.py +13 -1
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/models.py +16 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/constants.py +2 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/contracts/__init__.py +2 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/contracts/base.py +32 -9
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/contracts/events.py +27 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/version.py +1 -1
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/pyproject.toml +3 -3
- atlan_application_sdk_api-3.57.0/application_sdk/common/concurrency.py +0 -45
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/README.md +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/api-files.txt +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/__init__.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/_build_info.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/_context_errors.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/_env.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/_install.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/_logging.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/_obstore_config.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/_runtime/__init__.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/_runtime/cgroup.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/_runtime/offload.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/_runtime/progress.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/clients/__init__.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/clients/_interface.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/clients/_sql_failure_classifier.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/clients/http_errors.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/clients/models.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/clients/sql.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/clients/sql_errors.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/clients/sql_typecasters.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/clients/ssl_utils.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/_generated_tree.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/_listing.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/aws_utils_errors.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/backoff.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/build_identity.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/filter_matching.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/logger.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/sql_filters.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/sql_filters_errors.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/ssl_utils.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/task_queue.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/types.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/common/utils.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/contracts/types.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/contracts/types_errors.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/credentials/__init__.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/credentials/errors.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/credentials/extra.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/credentials/ingress.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/credentials/ref.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/credentials/requirements.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/credentials/spec.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/credentials/types.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/credentials/utils.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/errors/__init__.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/errors/base.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/errors/categories.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/errors/http.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/errors/leaves.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/errors/wire.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/handler/__init__.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/handler/_dispatch.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/handler/_warmup.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/handler/asgi.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/handler/base.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/handler/context.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/handler/contracts.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/handler/manifest.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/handler/metadata_routes.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/handler/object_routes.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/handler/request_contract.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/handler/routes.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/handler/service_errors.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/server/__init__.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/server/fastapi/models.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/templates/__init__.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/templates/contracts/__init__.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/templates/contracts/base_metadata_extraction.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/templates/contracts/incremental_sql.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/templates/contracts/sql_metadata.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/templates/contracts/sql_query.py +0 -0
- {atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/hatch_build.py +0 -0
|
@@ -188,9 +188,14 @@ temporal.db
|
|
|
188
188
|
.claude/scheduled_tasks.lock
|
|
189
189
|
|
|
190
190
|
# Remediation run artifacts
|
|
191
|
-
remediation/node_modules/
|
|
192
191
|
remediation/runs/
|
|
193
192
|
|
|
193
|
+
# npm installs at any depth. The remediate skill's optional Reactor path has
|
|
194
|
+
# readers `npm i` into their own checkout, and one left under
|
|
195
|
+
# packages/conformance/conformance/ would otherwise ship in the next wheel:
|
|
196
|
+
# hatch builds from the git-ignore-filtered tree.
|
|
197
|
+
node_modules/
|
|
198
|
+
|
|
194
199
|
# Renovate setup
|
|
195
200
|
renovate-config/README.md
|
|
196
201
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: atlan-application-sdk-api
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.58.0
|
|
4
4
|
Summary: Experimental: the handler surface of the Atlan Application SDK, for the consolidated API host
|
|
5
5
|
Project-URL: Homepage, https://github.com/atlanhq/application-sdk
|
|
6
6
|
Project-URL: Source, https://github.com/atlanhq/application-sdk/tree/main/packages/api
|
|
@@ -34,8 +34,8 @@ Requires-Dist: obstore<0.13.0,>=0.12.0; extra == 'obstore'
|
|
|
34
34
|
Provides-Extra: pandas
|
|
35
35
|
Requires-Dist: pandas<4.0.0,>=2.2.3; extra == 'pandas'
|
|
36
36
|
Provides-Extra: pyatlan
|
|
37
|
-
Requires-Dist: authlib<2,>=1.9.
|
|
38
|
-
Requires-Dist: pyatlan<12,>=11.7.
|
|
37
|
+
Requires-Dist: authlib<2,>=1.9.6; extra == 'pyatlan'
|
|
38
|
+
Requires-Dist: pyatlan<12,>=11.7.1; extra == 'pyatlan'
|
|
39
39
|
Provides-Extra: sql
|
|
40
40
|
Requires-Dist: httpx<0.29.0,>=0.27.0; extra == 'sql'
|
|
41
41
|
Requires-Dist: python-dotenv<2.0.0,>=1.2.2; extra == 'sql'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
+
import urllib.request
|
|
2
3
|
import warnings
|
|
3
4
|
from typing import Any, Literal, overload
|
|
4
5
|
|
|
@@ -56,6 +57,86 @@ class _SharedTransport(httpx.AsyncBaseTransport):
|
|
|
56
57
|
return None
|
|
57
58
|
|
|
58
59
|
|
|
60
|
+
class _EnvProxyHTTPTransport(httpx.AsyncHTTPTransport):
|
|
61
|
+
"""``AsyncHTTPTransport`` that applies the environment's proxy settings.
|
|
62
|
+
|
|
63
|
+
httpx only honors ``HTTP(S)_PROXY`` / ``ALL_PROXY`` / ``NO_PROXY`` when the
|
|
64
|
+
client builds its own transport (``allow_env_proxies = trust_env and
|
|
65
|
+
transport is None``). ``BaseClient`` always passes ``transport=``, so
|
|
66
|
+
without this every request connects directly, and on hosts whose egress
|
|
67
|
+
is proxy-only it times out with no HTTP response.
|
|
68
|
+
|
|
69
|
+
The proxy is chosen per request URL: hosts matching ``NO_PROXY`` (and
|
|
70
|
+
every request when no proxy is configured) go through this transport's
|
|
71
|
+
own pool, others through a lazily created proxied transport built with
|
|
72
|
+
the same keyword arguments (TLS context, pool limits, connect retries).
|
|
73
|
+
Proxy settings are read once, at construction, as httpx does.
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
def __init__(self, **kwargs: Any) -> None:
|
|
77
|
+
super().__init__(**kwargs)
|
|
78
|
+
self._transport_kwargs = kwargs
|
|
79
|
+
self._env_proxies = urllib.request.getproxies_environment()
|
|
80
|
+
self._proxied: dict[str, httpx.AsyncBaseTransport] = {}
|
|
81
|
+
|
|
82
|
+
def _proxy_for(self, url: httpx.URL) -> str | None:
|
|
83
|
+
proxy = self._env_proxies.get(url.scheme) or self._env_proxies.get("all")
|
|
84
|
+
if not proxy or not url.host:
|
|
85
|
+
return None
|
|
86
|
+
# Stdlib NO_PROXY matcher (suffix, exact host, "*"); missing from typeshed.
|
|
87
|
+
if urllib.request.proxy_bypass_environment( # pyright: ignore[reportAttributeAccessIssue]
|
|
88
|
+
url.host, self._env_proxies
|
|
89
|
+
):
|
|
90
|
+
return None
|
|
91
|
+
return proxy
|
|
92
|
+
|
|
93
|
+
async def handle_async_request(self, request: httpx.Request) -> httpx.Response:
|
|
94
|
+
proxy = self._proxy_for(request.url)
|
|
95
|
+
if proxy is None:
|
|
96
|
+
return await super().handle_async_request(request)
|
|
97
|
+
transport = self._proxied.get(proxy)
|
|
98
|
+
if transport is None:
|
|
99
|
+
transport = self._make_proxied_transport(proxy)
|
|
100
|
+
self._proxied[proxy] = transport
|
|
101
|
+
return await transport.handle_async_request(request)
|
|
102
|
+
|
|
103
|
+
def _make_proxied_transport(self, proxy: str) -> httpx.AsyncBaseTransport:
|
|
104
|
+
return httpx.AsyncHTTPTransport(**self._transport_kwargs, proxy=proxy)
|
|
105
|
+
|
|
106
|
+
async def _close_proxied(self) -> BaseException | None:
|
|
107
|
+
"""Close every proxied pool, even when one close raises or is cancelled.
|
|
108
|
+
|
|
109
|
+
The owning ``BaseClient`` drops its reference before closing, so a pool
|
|
110
|
+
skipped here would never be closed. Returns the first failure for the
|
|
111
|
+
caller to raise once the direct pool is closed too.
|
|
112
|
+
"""
|
|
113
|
+
proxied, self._proxied = list(self._proxied.values()), {}
|
|
114
|
+
first_error: BaseException | None = None
|
|
115
|
+
for transport in proxied:
|
|
116
|
+
try:
|
|
117
|
+
await transport.aclose()
|
|
118
|
+
except BaseException as exc: # includes CancelledError; re-raised by caller
|
|
119
|
+
if first_error is None:
|
|
120
|
+
first_error = exc
|
|
121
|
+
return first_error
|
|
122
|
+
|
|
123
|
+
async def __aexit__(self, *args: Any) -> None:
|
|
124
|
+
error = await self._close_proxied()
|
|
125
|
+
try:
|
|
126
|
+
await super().__aexit__(*args)
|
|
127
|
+
finally:
|
|
128
|
+
if error is not None:
|
|
129
|
+
raise error
|
|
130
|
+
|
|
131
|
+
async def aclose(self) -> None:
|
|
132
|
+
error = await self._close_proxied()
|
|
133
|
+
try:
|
|
134
|
+
await super().aclose()
|
|
135
|
+
finally:
|
|
136
|
+
if error is not None:
|
|
137
|
+
raise error
|
|
138
|
+
|
|
139
|
+
|
|
59
140
|
class BaseClient(ClientInterface):
|
|
60
141
|
"""
|
|
61
142
|
Base client for non-SQL based applications.
|
|
@@ -161,7 +242,9 @@ class BaseClient(ClientInterface):
|
|
|
161
242
|
# TLS verification lives on the transport: httpx ignores
|
|
162
243
|
# ``AsyncClient(verify=...)`` whenever ``transport=`` is also passed,
|
|
163
244
|
# so the SDK context (default CAs plus SSL_CERT_DIR) must be set here.
|
|
164
|
-
|
|
245
|
+
# Passing ``transport=`` also disables httpx's env-proxy handling, so
|
|
246
|
+
# the default transport applies HTTP(S)_PROXY / NO_PROXY itself.
|
|
247
|
+
self.http_retry_transport: httpx.AsyncBaseTransport = _EnvProxyHTTPTransport(
|
|
165
248
|
verify=get_ssl_context(),
|
|
166
249
|
limits=_HTTP_POOL_LIMITS,
|
|
167
250
|
retries=_HTTP_CONNECT_RETRIES,
|
|
@@ -15,6 +15,9 @@ Public API::
|
|
|
15
15
|
DataframeType,
|
|
16
16
|
)
|
|
17
17
|
|
|
18
|
+
``get_safe_num_threads`` and ``TaskResult`` are deprecated and removed in v4.0;
|
|
19
|
+
see each one's notice for its replacement.
|
|
20
|
+
|
|
18
21
|
Note: ``application_sdk.common.error_codes`` is retained for back-compat with
|
|
19
22
|
v2 connectors. Prefer ``application_sdk.errors`` for new code.
|
|
20
23
|
"""
|
|
@@ -7,6 +7,8 @@ import time
|
|
|
7
7
|
from collections.abc import Iterator
|
|
8
8
|
from typing import TYPE_CHECKING, Any
|
|
9
9
|
|
|
10
|
+
from typing_extensions import deprecated
|
|
11
|
+
|
|
10
12
|
from application_sdk.common.aws_utils_errors import (
|
|
11
13
|
AwsAssumeRoleError,
|
|
12
14
|
AwsClientCreationError,
|
|
@@ -274,7 +276,7 @@ def generate_aws_rds_token_with_iam_user(
|
|
|
274
276
|
raise AwsRdsTokenError(cause=e) from e
|
|
275
277
|
|
|
276
278
|
|
|
277
|
-
def
|
|
279
|
+
def _get_cluster_identifier(aws_client) -> str | None:
|
|
278
280
|
"""
|
|
279
281
|
Retrieve the cluster identifier from AWS Redshift clusters.
|
|
280
282
|
|
|
@@ -298,10 +300,31 @@ def get_cluster_identifier(aws_client) -> str | None:
|
|
|
298
300
|
return None
|
|
299
301
|
|
|
300
302
|
|
|
303
|
+
@deprecated(
|
|
304
|
+
"get_cluster_identifier is deprecated; use the Redshift client's describe_clusters() directly instead — will be "
|
|
305
|
+
"removed in v4.0."
|
|
306
|
+
)
|
|
307
|
+
def get_cluster_identifier(aws_client) -> str | None:
|
|
308
|
+
"""The first Redshift cluster's identifier, or ``None`` when there is none.
|
|
309
|
+
|
|
310
|
+
.. deprecated:: 3.58.0
|
|
311
|
+
Call ``describe_clusters()`` on the boto3 Redshift client. Will be
|
|
312
|
+
removed in v4.0.
|
|
313
|
+
"""
|
|
314
|
+
return _get_cluster_identifier(aws_client)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
@deprecated(
|
|
318
|
+
"create_aws_session is deprecated; use boto3.Session(aws_access_key_id=..., aws_secret_access_key=...) instead — will be "
|
|
319
|
+
"removed in v4.0."
|
|
320
|
+
)
|
|
301
321
|
def create_aws_session(credentials: dict[str, Any]) -> boto3.Session:
|
|
302
322
|
"""
|
|
303
323
|
Create a boto3 session with AWS credentials.
|
|
304
324
|
|
|
325
|
+
.. deprecated:: 3.58.0
|
|
326
|
+
Build ``boto3.Session`` directly. Will be removed in v4.0.
|
|
327
|
+
|
|
305
328
|
Args:
|
|
306
329
|
credentials: Dictionary containing AWS credentials
|
|
307
330
|
|
|
@@ -323,12 +346,19 @@ def create_aws_session(credentials: dict[str, Any]) -> boto3.Session:
|
|
|
323
346
|
)
|
|
324
347
|
|
|
325
348
|
|
|
349
|
+
@deprecated(
|
|
350
|
+
"get_cluster_credentials is deprecated; use the Redshift client's get_cluster_credentials_with_iam() directly instead — will be "
|
|
351
|
+
"removed in v4.0."
|
|
352
|
+
)
|
|
326
353
|
def get_cluster_credentials(
|
|
327
354
|
aws_client, credentials: dict[str, Any], extra: dict[str, Any]
|
|
328
355
|
) -> dict[str, str]:
|
|
329
356
|
"""
|
|
330
357
|
Retrieve cluster credentials using IAM authentication.
|
|
331
358
|
|
|
359
|
+
.. deprecated:: 3.58.0
|
|
360
|
+
Call ``get_cluster_credentials_with_iam()`` on the boto3 Redshift client. Will be removed in v4.0.
|
|
361
|
+
|
|
332
362
|
Args:
|
|
333
363
|
aws_client: Boto3 Redshift client instance
|
|
334
364
|
credentials: Dictionary containing connection credentials
|
|
@@ -337,7 +367,7 @@ def get_cluster_credentials(
|
|
|
337
367
|
Dict[str, str]: Dictionary containing DbUser and DbPassword
|
|
338
368
|
"""
|
|
339
369
|
database = extra["database"]
|
|
340
|
-
cluster_identifier = credentials.get("cluster_id") or
|
|
370
|
+
cluster_identifier = credentials.get("cluster_id") or _get_cluster_identifier(
|
|
341
371
|
aws_client
|
|
342
372
|
)
|
|
343
373
|
return aws_client.get_cluster_credentials_with_iam(
|
|
@@ -454,6 +484,10 @@ def create_aws_client(
|
|
|
454
484
|
raise AwsClientCreationError(service=service, cause=e) from e
|
|
455
485
|
|
|
456
486
|
|
|
487
|
+
@deprecated(
|
|
488
|
+
"create_engine_url is deprecated; use sqlalchemy.engine.URL.create() instead — will be "
|
|
489
|
+
"removed in v4.0."
|
|
490
|
+
)
|
|
457
491
|
def create_engine_url(
|
|
458
492
|
drivername: str,
|
|
459
493
|
credentials: dict[str, Any],
|
|
@@ -463,6 +497,9 @@ def create_engine_url(
|
|
|
463
497
|
"""
|
|
464
498
|
Create SQLAlchemy engine URL for Redshift connection.
|
|
465
499
|
|
|
500
|
+
.. deprecated:: 3.58.0
|
|
501
|
+
Call ``sqlalchemy.engine.URL.create()``. Will be removed in v4.0.
|
|
502
|
+
|
|
466
503
|
Args:
|
|
467
504
|
credentials: Dictionary containing connection credentials
|
|
468
505
|
cluster_credentials: Dictionary containing DbUser and DbPassword
|
|
@@ -486,9 +523,17 @@ def create_engine_url(
|
|
|
486
523
|
)
|
|
487
524
|
|
|
488
525
|
|
|
526
|
+
@deprecated(
|
|
527
|
+
"get_all_aws_regions is deprecated; use the EC2 client's describe_regions() directly instead — will be "
|
|
528
|
+
"removed in v4.0."
|
|
529
|
+
)
|
|
489
530
|
def get_all_aws_regions() -> list[str]:
|
|
490
531
|
"""
|
|
491
532
|
Get all available AWS regions dynamically using EC2 describe_regions API.
|
|
533
|
+
|
|
534
|
+
.. deprecated:: 3.58.0
|
|
535
|
+
Call ``describe_regions()`` on a boto3 EC2 client. Will be removed in v4.0.
|
|
536
|
+
|
|
492
537
|
Returns:
|
|
493
538
|
list[str]: List of all AWS region names
|
|
494
539
|
Raises:
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Concurrency utilities — CPU detection, thread pool sizing, and offloading.
|
|
2
|
+
|
|
3
|
+
``run_in_thread`` is re-exported here for handler code, which the consolidated
|
|
4
|
+
API host serves without the worker SDK: its usual app-facing path,
|
|
5
|
+
``application_sdk.execution.heartbeat``, loads the Temporal execution layer.
|
|
6
|
+
Both paths are the same function.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from typing_extensions import deprecated
|
|
10
|
+
|
|
11
|
+
from application_sdk._logging import get_logger
|
|
12
|
+
from application_sdk._runtime.cgroup import available_cpus
|
|
13
|
+
from application_sdk._runtime.offload import ( # noqa: F401 — re-exported for handler code
|
|
14
|
+
run_in_thread,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
logger = get_logger(__name__)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def get_actual_cpu_count() -> int:
|
|
21
|
+
"""Whole CPUs this process may use: the tighter of affinity and the CPU limit.
|
|
22
|
+
|
|
23
|
+
``os.cpu_count()`` and the affinity mask both report the node's cores, not
|
|
24
|
+
the pod's: a worker limited to one CPU on a 16-core node sees 16 from
|
|
25
|
+
either. This also reads the container's CFS quota (cgroup v2 ``cpu.max``,
|
|
26
|
+
else v1 ``cpu.cfs_quota_us``), so it returns 1 there. A fractional quota
|
|
27
|
+
rounds down, never below 1.
|
|
28
|
+
|
|
29
|
+
It is the same number the SDK sizes its own thread and process pools
|
|
30
|
+
from (:func:`application_sdk._runtime.cgroup.available_cpus`).
|
|
31
|
+
|
|
32
|
+
Returns:
|
|
33
|
+
Number of CPUs available, at least 1.
|
|
34
|
+
"""
|
|
35
|
+
return available_cpus()
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@deprecated(
|
|
39
|
+
"get_safe_num_threads is deprecated; use get_actual_cpu_count() and size "
|
|
40
|
+
"the pool for your workload, or run_in_thread, whose pool the SDK already "
|
|
41
|
+
"sizes from the CPU limit — will be removed in v4.0."
|
|
42
|
+
)
|
|
43
|
+
def get_safe_num_threads() -> int:
|
|
44
|
+
"""Get recommended number of threads for parallel processing.
|
|
45
|
+
|
|
46
|
+
.. deprecated:: 3.58.0
|
|
47
|
+
Use :func:`get_actual_cpu_count` and pick a multiple that suits the
|
|
48
|
+
workload, or :func:`run_in_thread`. Will be removed in v4.0.
|
|
49
|
+
|
|
50
|
+
Returns:
|
|
51
|
+
2x the number of available CPU cores, minimum 2.
|
|
52
|
+
"""
|
|
53
|
+
return available_cpus() * 2
|
|
@@ -5,6 +5,8 @@ from __future__ import annotations
|
|
|
5
5
|
from dataclasses import dataclass
|
|
6
6
|
from typing import ClassVar
|
|
7
7
|
|
|
8
|
+
from typing_extensions import deprecated
|
|
9
|
+
|
|
8
10
|
from application_sdk.errors.leaves import (
|
|
9
11
|
DataIntegrityError,
|
|
10
12
|
InvalidInputError,
|
|
@@ -63,9 +65,19 @@ class AtomicWriteModeError(InvalidInputError):
|
|
|
63
65
|
field: str | None = "mode"
|
|
64
66
|
|
|
65
67
|
|
|
68
|
+
@deprecated(
|
|
69
|
+
"application_sdk.common.errors.FileConverterNotFoundError is deprecated; "
|
|
70
|
+
"catch application_sdk.errors.UnimplementedError (its base) instead — will "
|
|
71
|
+
"be removed in v4.0."
|
|
72
|
+
)
|
|
66
73
|
@dataclass(kw_only=True)
|
|
67
74
|
class FileConverterNotFoundError(UnimplementedError):
|
|
68
|
-
"""No converter registered for the given file type.
|
|
75
|
+
"""No converter registered for the given file type.
|
|
76
|
+
|
|
77
|
+
.. deprecated:: 3.58.0
|
|
78
|
+
Raised only by the deprecated ``common.file_converter``. Catch
|
|
79
|
+
:class:`~application_sdk.errors.UnimplementedError`. Will be removed in v4.0.
|
|
80
|
+
"""
|
|
69
81
|
|
|
70
82
|
code: ClassVar[str] = "UNIMPLEMENTED_FILE_CONVERTER"
|
|
71
83
|
message: str = "No converter found for file type"
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
from typing import Any, Dict, List, Optional, TypedDict
|
|
5
5
|
|
|
6
|
+
from typing_extensions import deprecated
|
|
7
|
+
|
|
6
8
|
|
|
7
9
|
@dataclass
|
|
8
10
|
class TaskStatistics:
|
|
@@ -25,7 +27,21 @@ class TaskStatistics:
|
|
|
25
27
|
self.partitions = []
|
|
26
28
|
|
|
27
29
|
|
|
30
|
+
@deprecated(
|
|
31
|
+
"application_sdk.common.models.TaskResult is deprecated; use "
|
|
32
|
+
"application_sdk.common.models.TaskStatistics for a task's output, or a "
|
|
33
|
+
"TypedDict of your own — will be removed in v4.0."
|
|
34
|
+
)
|
|
28
35
|
class TaskResult(TypedDict):
|
|
36
|
+
"""A ``{status, message, metadata}`` dict.
|
|
37
|
+
|
|
38
|
+
.. deprecated:: 3.58.0
|
|
39
|
+
Nothing in the SDK produces or reads it. Use :class:`TaskStatistics`
|
|
40
|
+
or define your own ``TypedDict``. Will be removed in v4.0. Calling a
|
|
41
|
+
``TypedDict`` builds a plain dict, so this warns only in type checkers
|
|
42
|
+
and conformance (B001), not at runtime.
|
|
43
|
+
"""
|
|
44
|
+
|
|
29
45
|
status: str
|
|
30
46
|
message: str
|
|
31
47
|
metadata: Dict[str, Any]
|
{atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/constants.py
RENAMED
|
@@ -1165,6 +1165,8 @@ METRICS_FILE_NAME = os.environ.get("ATLAN_METRICS_FILE_NAME", "metrics.parquet")
|
|
|
1165
1165
|
SIZING_BATCH_SIZE = env_int("ATLAN_SIZING_BATCH_SIZE", 500)
|
|
1166
1166
|
SIZING_FLUSH_INTERVAL_SECONDS = env_int("ATLAN_SIZING_FLUSH_INTERVAL_SECONDS", 60)
|
|
1167
1167
|
SIZING_FILE_NAME = os.environ.get("ATLAN_SIZING_FILE_NAME", "sizing.parquet")
|
|
1168
|
+
#: Signal discriminator for the traces adapter. No traces file is written:
|
|
1169
|
+
#: the adapter emits spans over OTLP and keeps its object-store sink off.
|
|
1168
1170
|
TRACES_FILE_NAME = os.environ.get("ATLAN_TRACES_FILE_NAME", "traces.parquet")
|
|
1169
1171
|
|
|
1170
1172
|
#: Upper bound, in seconds, on stopping the shared observability background
|
|
@@ -12,6 +12,7 @@ from typing import TYPE_CHECKING, Any
|
|
|
12
12
|
|
|
13
13
|
from application_sdk._install import lazy_getattr
|
|
14
14
|
from application_sdk.contracts.base import (
|
|
15
|
+
ContractDeclarationError,
|
|
15
16
|
ContractMetadata,
|
|
16
17
|
ContractValidationError,
|
|
17
18
|
HeartbeatDetails,
|
|
@@ -109,6 +110,7 @@ __all__ = [
|
|
|
109
110
|
"ConnectionRef",
|
|
110
111
|
"ContractMetadata",
|
|
111
112
|
"DeclaredFile",
|
|
113
|
+
"ContractDeclarationError",
|
|
112
114
|
"ContractValidationError",
|
|
113
115
|
"DownloadInput",
|
|
114
116
|
"DownloadOutput",
|
|
@@ -592,7 +592,11 @@ class Record(BaseModel):
|
|
|
592
592
|
|
|
593
593
|
|
|
594
594
|
class ContractValidationError(_InvalidInputError):
|
|
595
|
-
"""Deprecated: use ``application_sdk.
|
|
595
|
+
"""Deprecated: use ``application_sdk.contracts.ContractDeclarationError`` — removed in v4.0."""
|
|
596
|
+
|
|
597
|
+
#: Leaf instances never run this ``__init__``; the class default keeps the
|
|
598
|
+
#: inherited ``error_code`` and ``__str__`` working on them.
|
|
599
|
+
_error_code: ErrorCode | None = None
|
|
596
600
|
|
|
597
601
|
DEFAULT_ERROR_CODE: ClassVar[ErrorCode] = CONTRACT_VALIDATION
|
|
598
602
|
code: ClassVar[str] = "INVALID_INPUT_CONTRACT_VALIDATION"
|
|
@@ -608,7 +612,7 @@ class ContractValidationError(_InvalidInputError):
|
|
|
608
612
|
error_code: ErrorCode | None = None,
|
|
609
613
|
) -> None:
|
|
610
614
|
warnings.warn(
|
|
611
|
-
"ContractValidationError is deprecated; use application_sdk.
|
|
615
|
+
"ContractValidationError is deprecated; use application_sdk.contracts.ContractDeclarationError "
|
|
612
616
|
"— will be removed in v4.0",
|
|
613
617
|
DeprecationWarning,
|
|
614
618
|
stacklevel=2,
|
|
@@ -641,7 +645,26 @@ class ContractValidationError(_InvalidInputError):
|
|
|
641
645
|
return " | ".join(parts)
|
|
642
646
|
|
|
643
647
|
|
|
644
|
-
|
|
648
|
+
@dataclass(kw_only=True)
|
|
649
|
+
class ContractDeclarationError(ContractValidationError):
|
|
650
|
+
"""A class used as a contract is not one, or declares a field it may not.
|
|
651
|
+
|
|
652
|
+
Raised at decoration or class-definition time. It subclasses the deprecated
|
|
653
|
+
``ContractValidationError`` only until v4.0, so
|
|
654
|
+
``except ContractValidationError:`` clauses keep matching what the SDK
|
|
655
|
+
raises; constructing it does not warn. v4.0 deletes
|
|
656
|
+
``ContractValidationError`` and re-bases this class onto
|
|
657
|
+
``InvalidInputError``.
|
|
658
|
+
"""
|
|
659
|
+
|
|
660
|
+
code: ClassVar[str] = "INVALID_INPUT_CONTRACT_VALIDATION"
|
|
661
|
+
contract_type: str | None = None
|
|
662
|
+
field_name: str | None = None
|
|
663
|
+
expected_type: str | None = None
|
|
664
|
+
actual_type: str | None = None
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
class PayloadSafetyError(ContractDeclarationError):
|
|
645
668
|
"""Raised when a contract field uses a type that risks exceeding payload limits.
|
|
646
669
|
|
|
647
670
|
Temporal has a 2MB payload limit for workflow/activity inputs and outputs.
|
|
@@ -681,8 +704,8 @@ class PayloadSafetyError(ContractValidationError):
|
|
|
681
704
|
f" - Use Annotated[set[T], MaxItems(N)] (and likewise) for any other collection\n"
|
|
682
705
|
f" - Use allow_unbounded_fields=True class keyword to opt out (use with caution)"
|
|
683
706
|
)
|
|
684
|
-
# Skip ContractValidationError's __init__
|
|
685
|
-
#
|
|
707
|
+
# Skip ContractValidationError's warning __init__; call the categorical
|
|
708
|
+
# leaf directly.
|
|
686
709
|
_InvalidInputError.__init__(self, message=message)
|
|
687
710
|
self.contract_type = cls_name
|
|
688
711
|
self.field_name = field_name
|
|
@@ -1084,14 +1107,14 @@ def validate_is_contract(cls: type, context: str = "contract") -> None:
|
|
|
1084
1107
|
context: Description for error messages.
|
|
1085
1108
|
|
|
1086
1109
|
Raises:
|
|
1087
|
-
|
|
1110
|
+
ContractDeclarationError: If cls is not a contract base class subclass.
|
|
1088
1111
|
"""
|
|
1089
1112
|
if not (
|
|
1090
1113
|
isinstance(cls, type)
|
|
1091
1114
|
and issubclass(cls, (Input, Output, HeartbeatDetails, Record))
|
|
1092
1115
|
):
|
|
1093
|
-
raise
|
|
1094
|
-
f"{context} must be a contract class (Input/Output/HeartbeatDetails/Record), "
|
|
1116
|
+
raise ContractDeclarationError(
|
|
1117
|
+
message=f"{context} must be a contract class (Input/Output/HeartbeatDetails/Record), "
|
|
1095
1118
|
f"got {cls.__name__}",
|
|
1096
1119
|
contract_type=context,
|
|
1097
1120
|
)
|
|
@@ -1107,7 +1130,7 @@ def get_contract_fields(cls: type) -> dict[str, type]:
|
|
|
1107
1130
|
Dictionary mapping field names to their types.
|
|
1108
1131
|
|
|
1109
1132
|
Raises:
|
|
1110
|
-
|
|
1133
|
+
ContractDeclarationError: If cls is not a contract class.
|
|
1111
1134
|
"""
|
|
1112
1135
|
validate_is_contract(cls)
|
|
1113
1136
|
hints = get_type_hints(cls)
|
|
@@ -8,6 +8,7 @@ from enum import Enum
|
|
|
8
8
|
from typing import Any
|
|
9
9
|
|
|
10
10
|
from pydantic import BaseModel, Field
|
|
11
|
+
from typing_extensions import deprecated
|
|
11
12
|
|
|
12
13
|
from application_sdk.constants import (
|
|
13
14
|
APPLICATION_NAME,
|
|
@@ -96,9 +97,17 @@ class EventMetadata(BaseModel):
|
|
|
96
97
|
event_id: str | None = Field(init=True, default=None)
|
|
97
98
|
|
|
98
99
|
|
|
100
|
+
@deprecated(
|
|
101
|
+
"application_sdk.contracts.events.EventFilter is deprecated; use "
|
|
102
|
+
"application_sdk.handler.contracts.EventFilterRule instead — will be removed in v4.0."
|
|
103
|
+
)
|
|
99
104
|
class EventFilter(BaseModel):
|
|
100
105
|
"""Filter for events.
|
|
101
106
|
|
|
107
|
+
.. deprecated:: 3.58.0
|
|
108
|
+
A v2 event-registration model; nothing reads it. Use
|
|
109
|
+
``application_sdk.handler.contracts.EventFilterRule``. Will be removed in v4.0.
|
|
110
|
+
|
|
102
111
|
Attributes:
|
|
103
112
|
path: Path to filter on.
|
|
104
113
|
operator: Operator to use for filtering.
|
|
@@ -110,9 +119,17 @@ class EventFilter(BaseModel):
|
|
|
110
119
|
value: str
|
|
111
120
|
|
|
112
121
|
|
|
122
|
+
@deprecated(
|
|
123
|
+
"application_sdk.contracts.events.Consumes is deprecated; use "
|
|
124
|
+
"application_sdk.handler.contracts.EventTriggerConfig instead — will be removed in v4.0."
|
|
125
|
+
)
|
|
113
126
|
class Consumes(BaseModel):
|
|
114
127
|
"""Model for event consumption configuration.
|
|
115
128
|
|
|
129
|
+
.. deprecated:: 3.58.0
|
|
130
|
+
A v2 event-registration model; nothing reads it. Use
|
|
131
|
+
``application_sdk.handler.contracts.EventTriggerConfig``. Will be removed in v4.0.
|
|
132
|
+
|
|
116
133
|
Attributes:
|
|
117
134
|
event_id: ID of the event.
|
|
118
135
|
event_type: Type of the event.
|
|
@@ -128,9 +145,19 @@ class Consumes(BaseModel):
|
|
|
128
145
|
filters: list[EventFilter] = Field(init=True, default=[])
|
|
129
146
|
|
|
130
147
|
|
|
148
|
+
@deprecated(
|
|
149
|
+
"application_sdk.contracts.events.EventRegistration is deprecated; use "
|
|
150
|
+
"application_sdk.handler.contracts.EventTriggerConfig, one per consumed event, "
|
|
151
|
+
"instead — will be removed in v4.0."
|
|
152
|
+
)
|
|
131
153
|
class EventRegistration(BaseModel):
|
|
132
154
|
"""Model for event registration.
|
|
133
155
|
|
|
156
|
+
.. deprecated:: 3.58.0
|
|
157
|
+
A v2 event-registration model; nothing reads it. Use
|
|
158
|
+
``application_sdk.handler.contracts.EventTriggerConfig``, one per consumed
|
|
159
|
+
event. Will be removed in v4.0.
|
|
160
|
+
|
|
134
161
|
Attributes:
|
|
135
162
|
consumes: List of events to consume.
|
|
136
163
|
produces: List of events to produce.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "atlan-application-sdk-api"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.58.0"
|
|
4
4
|
description = "Experimental: the handler surface of the Atlan Application SDK, for the consolidated API host"
|
|
5
5
|
license = "Apache-2.0"
|
|
6
6
|
authors = [
|
|
@@ -61,11 +61,11 @@ obstore = ["obstore>=0.12.0,<0.13.0"]
|
|
|
61
61
|
# only inside ConnectionRef's Atlas conversion helpers, which the host never
|
|
62
62
|
# calls. Declared so those function-level imports are an extra's, as on the worker.
|
|
63
63
|
pyatlan = [
|
|
64
|
-
"pyatlan>=11.7.
|
|
64
|
+
"pyatlan>=11.7.1,<12",
|
|
65
65
|
# pyatlan 11.5.0 already requires authlib~=1.9.1 on Python >=3.10. Published
|
|
66
66
|
# here too so a resolver that ignores requires-python cannot pick pyatlan's
|
|
67
67
|
# py3.9 authlib branch for this wheel.
|
|
68
|
-
"authlib>=1.9.
|
|
68
|
+
"authlib>=1.9.6,<2", # CVE-2026-96760
|
|
69
69
|
]
|
|
70
70
|
|
|
71
71
|
[project.urls]
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"""Concurrency utilities — CPU detection, thread pool sizing, and offloading.
|
|
2
|
-
|
|
3
|
-
``run_in_thread`` is re-exported here for handler code, which the consolidated
|
|
4
|
-
API host serves without the worker SDK: its usual app-facing path,
|
|
5
|
-
``application_sdk.execution.heartbeat``, loads the Temporal execution layer.
|
|
6
|
-
Both paths are the same function.
|
|
7
|
-
"""
|
|
8
|
-
|
|
9
|
-
import os
|
|
10
|
-
|
|
11
|
-
from application_sdk._logging import get_logger
|
|
12
|
-
from application_sdk._runtime.offload import ( # noqa: F401 — re-exported for handler code
|
|
13
|
-
run_in_thread,
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
logger = get_logger(__name__)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def get_actual_cpu_count() -> int:
|
|
20
|
-
"""Get the actual number of CPUs available to the current process.
|
|
21
|
-
|
|
22
|
-
Uses CPU affinity when available (handles cgroups/container limits
|
|
23
|
-
correctly). Falls back to ``os.cpu_count()`` on platforms without
|
|
24
|
-
``sched_getaffinity``.
|
|
25
|
-
|
|
26
|
-
Returns:
|
|
27
|
-
Number of CPUs available.
|
|
28
|
-
"""
|
|
29
|
-
try:
|
|
30
|
-
return len(os.sched_getaffinity(0)) or 1 # type: ignore[attr-defined]
|
|
31
|
-
except AttributeError:
|
|
32
|
-
logger.warning(
|
|
33
|
-
"sched_getaffinity unavailable on this platform; falling back to os.cpu_count()",
|
|
34
|
-
exc_info=True,
|
|
35
|
-
)
|
|
36
|
-
return os.cpu_count() or 1
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
def get_safe_num_threads() -> int:
|
|
40
|
-
"""Get recommended number of threads for parallel processing.
|
|
41
|
-
|
|
42
|
-
Returns:
|
|
43
|
-
2x the number of available CPU cores, minimum 2.
|
|
44
|
-
"""
|
|
45
|
-
return get_actual_cpu_count() * 2 or 2
|
|
File without changes
|
|
File without changes
|
{atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/__init__.py
RENAMED
|
File without changes
|
{atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/_build_info.py
RENAMED
|
File without changes
|
|
File without changes
|
{atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/_env.py
RENAMED
|
File without changes
|
{atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/_install.py
RENAMED
|
File without changes
|
{atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/_logging.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/clients/sql.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/errors/base.py
RENAMED
|
File without changes
|
|
File without changes
|
{atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/errors/http.py
RENAMED
|
File without changes
|
|
File without changes
|
{atlan_application_sdk_api-3.57.0 → atlan_application_sdk_api-3.58.0}/application_sdk/errors/wire.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|