atlan-application-sdk 2.3.0__py3-none-any.whl → 2.3.2__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.
@@ -2,13 +2,13 @@
2
2
 
3
3
  import json
4
4
  import os
5
- import shutil
6
5
  from typing import List, Union
7
6
 
8
7
  import orjson
9
8
  from dapr.clients import DaprClient
10
9
  from temporalio import activity
11
10
 
11
+ from application_sdk.common.file_ops import SafeFileOps
12
12
  from application_sdk.constants import (
13
13
  DAPR_MAX_GRPC_MESSAGE_LENGTH,
14
14
  DEPLOYMENT_OBJECT_STORE_NAME,
@@ -304,7 +304,7 @@ class ObjectStore:
304
304
  ... )
305
305
  """
306
306
  try:
307
- with open(source, "rb") as f:
307
+ with SafeFileOps.open(source, "rb") as f:
308
308
  file_content = f.read()
309
309
  except IOError as e:
310
310
  logger.error(f"Error reading file {source}: {str(e)}")
@@ -366,7 +366,7 @@ class ObjectStore:
366
366
  ... recursive=False
367
367
  ... )
368
368
  """
369
- if not os.path.isdir(source):
369
+ if not SafeFileOps.isdir(source):
370
370
  raise ValueError(f"The provided path '{source}' is not a valid directory.")
371
371
 
372
372
  try:
@@ -423,13 +423,13 @@ class ObjectStore:
423
423
  """
424
424
  # Ensure directory exists
425
425
 
426
- if not os.path.exists(os.path.dirname(destination)):
427
- os.makedirs(os.path.dirname(destination), exist_ok=True)
426
+ if not SafeFileOps.exists(os.path.dirname(destination)):
427
+ SafeFileOps.makedirs(os.path.dirname(destination), exist_ok=True)
428
428
 
429
429
  try:
430
430
  response_data = await cls.get_content(source, store_name)
431
431
 
432
- with open(destination, "wb") as f:
432
+ with SafeFileOps.open(destination, "wb") as f:
433
433
  f.write(response_data)
434
434
 
435
435
  logger.info(f"Successfully downloaded file: {source}")
@@ -552,10 +552,10 @@ class ObjectStore:
552
552
  path: The path to the file or directory to remove.
553
553
  """
554
554
  try:
555
- if os.path.isfile(path) or os.path.islink(path):
556
- os.remove(path)
557
- elif os.path.isdir(path):
558
- shutil.rmtree(path)
555
+ if SafeFileOps.isfile(path) or os.path.islink(path):
556
+ SafeFileOps.remove(path)
557
+ elif SafeFileOps.isdir(path):
558
+ SafeFileOps.rmtree(path)
559
559
  except FileNotFoundError:
560
560
  pass # ignore if the file or directory doesn't exist
561
561
  except Exception as e:
@@ -8,6 +8,7 @@ from typing import Any, Dict
8
8
  from temporalio import activity
9
9
 
10
10
  from application_sdk.activities.common.utils import get_object_store_prefix
11
+ from application_sdk.common.file_ops import SafeFileOps
11
12
  from application_sdk.constants import (
12
13
  APPLICATION_NAME,
13
14
  STATE_STORE_PATH_TEMPLATE,
@@ -167,10 +168,10 @@ class StateStore:
167
168
  # update the state with the new value
168
169
  current_state[key] = value
169
170
 
170
- os.makedirs(os.path.dirname(state_file_path), exist_ok=True)
171
+ SafeFileOps.makedirs(os.path.dirname(state_file_path), exist_ok=True)
171
172
 
172
173
  # save the state to a local file
173
- with open(state_file_path, "w") as file:
174
+ with SafeFileOps.open(state_file_path, "w") as file:
174
175
  json.dump(current_state, file)
175
176
 
176
177
  # save the state to the object store
@@ -243,10 +244,10 @@ class StateStore:
243
244
  # update the state with the new value
244
245
  current_state.update(value)
245
246
 
246
- os.makedirs(os.path.dirname(state_file_path), exist_ok=True)
247
+ SafeFileOps.makedirs(os.path.dirname(state_file_path), exist_ok=True)
247
248
 
248
249
  # save the state to a local file
249
- with open(state_file_path, "w") as file:
250
+ with SafeFileOps.open(state_file_path, "w") as file:
250
251
  json.dump(current_state, file)
251
252
 
252
253
  # save the state to the object store
@@ -2,4 +2,4 @@
2
2
  Version information for the application_sdk package.
3
3
  """
4
4
 
5
- __version__ = "2.3.0"
5
+ __version__ = "2.3.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atlan-application-sdk
3
- Version: 2.3.0
3
+ Version: 2.3.2
4
4
  Summary: Atlan Application SDK is a Python library for developing applications on the Atlan Platform
5
5
  Project-URL: Repository, https://github.com/atlanhq/application-sdk
6
6
  Project-URL: Documentation, https://github.com/atlanhq/application-sdk/README.md
@@ -93,8 +93,23 @@ poetry add atlan-application-sdk
93
93
 
94
94
  ## Getting Started
95
95
 
96
- - Want to develop locally or run examples from this repository? Check out our [Getting Started Guide](docs/docs/guides/getting-started.md) for a step-by-step walkthrough!
97
- - Detailed documentation for the application-sdk is available at [docs](https://github.com/atlanhq/application-sdk/blob/main/docs/docs/) folder.
96
+ - Want to develop locally or run examples from this repository? Check out our [Getting Started Guide](docs/guides/getting-started.md) for a step-by-step walkthrough!
97
+ - Detailed documentation for the application-sdk is available at [docs](https://github.com/atlanhq/application-sdk/blob/main/docs/) folder.
98
+
99
+ ## 🐳 Docker
100
+
101
+ ### Pre-built Images (Harbor)
102
+
103
+ ```bash
104
+ # Latest main image
105
+ docker pull registry.atlan.com/public/application-sdk:main-latest
106
+
107
+ # Versioned image
108
+ docker pull registry.atlan.com/public/application-sdk:main-2.3.1
109
+
110
+ # Commit-specific image
111
+ docker pull registry.atlan.com/public/application-sdk:sha-49c027f
112
+ ```
98
113
 
99
114
  ## Contributing
100
115
 
@@ -1,6 +1,6 @@
1
1
  application_sdk/__init__.py,sha256=2e2mvmLJ5dxmJGPELtb33xwP-j6JMdoIuqKycEn7hjg,151
2
- application_sdk/constants.py,sha256=_JprQls6AurPBHMG8TgGkLT7q4Lj8YxMAabYQx8Heks,12544
3
- application_sdk/version.py,sha256=Lnq43x1REzO0vMqhztEDG59AS0CKBDL70U5_-QOtwwc,84
2
+ application_sdk/constants.py,sha256=PneIcT8-ypvCDRZo0uEzfn43X41MMQQPeGpBE1AAm5E,13511
3
+ application_sdk/version.py,sha256=QlDJbSgyks5cBqICIKJQf6EUYOPJztONFx8hFKl5iXY,84
4
4
  application_sdk/worker.py,sha256=5V_zxkx64moHSkMaZTNnbfstoygMBk7SAOSEy6AZZZM,11552
5
5
  application_sdk/activities/__init__.py,sha256=i7iY6aL1VFg185n2rLLvD_sI2BA9zJ33jL5rD_sY__U,12350
6
6
  application_sdk/activities/lock_management.py,sha256=6Wdf3jMKitoarHQP91PIJOoGFz4aaOLS_40c7n1yAOA,3902
@@ -14,7 +14,7 @@ application_sdk/activities/metadata_extraction/base.py,sha256=ENFojpxqKdN_eVSL4i
14
14
  application_sdk/activities/metadata_extraction/rest.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  application_sdk/activities/metadata_extraction/sql.py,sha256=CmE77EsgbOuDL5AKaRCnq1jApJnDWNVxx-RZ49cJwus,27415
16
16
  application_sdk/activities/query_extraction/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- application_sdk/activities/query_extraction/sql.py,sha256=Gsa79R8CYY0uyt3rA2nLMfQs8-C4_zg1pJ_yYSF2cZw,21193
17
+ application_sdk/activities/query_extraction/sql.py,sha256=1KmDY_B1saz8wv2hGtGy5aOu07qClRDv1M_wCwhQQ8k,21298
18
18
  application_sdk/application/__init__.py,sha256=sTgyt4MBDvsQJ2yI0TxzB1Wp68WC-5fBkSExUgtW8LY,12559
19
19
  application_sdk/application/metadata_extraction/sql.py,sha256=TmHTLdWLxqtSbVyzfNmnQNe6BUePVIlZxaiQHZXXbyI,9812
20
20
  application_sdk/clients/__init__.py,sha256=C9T84J7V6ZumcoWJPAxdd3tqSmbyciaGBJn-CaCCny0,1341
@@ -35,6 +35,8 @@ application_sdk/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
35
35
  application_sdk/common/aws_utils.py,sha256=xlSMIQyjvQ-CydEXaxXrnPUygv7AAbCLsxhZ2wtKnzg,11219
36
36
  application_sdk/common/error_codes.py,sha256=BGdOSfhKe4pd9oM9T2N8GASZeIJU2Be1NcThL8LkKBQ,14900
37
37
  application_sdk/common/file_converter.py,sha256=ta0PVh7uIEGJg0BTPUJnSjj55ve2iVAOkqwAeg96_-g,3079
38
+ application_sdk/common/file_ops.py,sha256=CSl3wVh7Bt3EBEWzdGvbUyh5R4aBZ5TkkbNS8d4frcA,4338
39
+ application_sdk/common/path.py,sha256=zCyrK4OA1fcMgV8lkxAeCgH6VP9SEIpYmi2GLi3NPIU,1169
38
40
  application_sdk/common/types.py,sha256=qkVr3SAR1zn5_0w9hFt18vGtcnaPLKlMJLSBhTSKePU,134
39
41
  application_sdk/common/utils.py,sha256=czcWvqoe2PawDvHOahk_AI88Zqth-CM3KzdGmehHQJ4,19286
40
42
  application_sdk/common/.cursor/BUGBOT.md,sha256=OkB5TMAEJFzaBfbNb3g9ZDPW2r1krQE_KEuJbytMPuI,12176
@@ -63,19 +65,21 @@ application_sdk/handlers/sql.py,sha256=WkFSo61SLiY3FoHO35Gqxx6YXRTftVJGrWBdLRELw
63
65
  application_sdk/interceptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
66
  application_sdk/interceptors/cleanup.py,sha256=JlFcM_2Y5AIEfGTSNe0aoon7eoE68MIXI0rA3LHsSeY,5966
65
67
  application_sdk/interceptors/correlation_context.py,sha256=j486uXZbLA85eTBJ8hxXS13vA8Ucf3_Nt5KiyA_cJVY,5864
66
- application_sdk/interceptors/events.py,sha256=e0O6uK9_aCTmOORaTGN9RbcTg9_KNaakq-Meh8l2lsI,6477
68
+ application_sdk/interceptors/events.py,sha256=z6aptp7D6gBunT9niKvb8KwdvfhQ9-dmSE1xcsvKB-Y,6914
67
69
  application_sdk/interceptors/lock.py,sha256=5ETm20zrTaH2b9fepN4Ckp1tGJV-uINqDrno_5RW3aw,6169
68
70
  application_sdk/interceptors/models.py,sha256=kEzJKvb-G1M7aKrLPgAmsukJXLXeh8hIJKwEkOiaY28,6115
69
71
  application_sdk/interceptors/.cursor/BUGBOT.md,sha256=pxmUF2c7dtaXAX8yAa1-LBa6FCrj_uw7aQcHrppjf1A,14570
70
72
  application_sdk/io/__init__.py,sha256=Fse-fEyrpMlLUxwyFkH8vWWSXz8rdWGlAjZy5ulAZCU,27767
71
- application_sdk/io/json.py,sha256=sNSyHZCM_ZeaiJHUrolYVHKreBQqSCBsfsjD3JSkoD0,19729
72
- application_sdk/io/parquet.py,sha256=zy9H_TvWI5CkktJ582NH7Ut_5rUH_S0Jy7ZbTD0JxeI,34227
73
+ application_sdk/io/json.py,sha256=tQvi8pCTvZGhf5MD7b3FzE-LslQZNhadpjb4qx47Xgo,20476
74
+ application_sdk/io/parquet.py,sha256=csscTnu4pULQ81ShfB54HSu5qBjrJpt3QqJGtc_orWI,34371
73
75
  application_sdk/io/utils.py,sha256=sn_8Q6HgjeC8uyZp2XGMAfqdJ8XzkIllOEVYXIH54DY,10724
74
76
  application_sdk/observability/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
77
  application_sdk/observability/context.py,sha256=lJjpfxEjMY_hrdSDqq519YaWcztgc_1nM4d-mGV5shs,634
76
- application_sdk/observability/logger_adaptor.py,sha256=Fq5OE579ozr0EzsNYEh2H0q3POVAxtlWfJ-PSwWDGLM,30194
77
- application_sdk/observability/metrics_adaptor.py,sha256=5Oz02lUED60duryoVDF9mbD11fpxhbXi7P1609n_15Y,16446
78
+ application_sdk/observability/logger_adaptor.py,sha256=dwyRMRHj4qZu_HhwK12SDpJ8NPpRhHVHFgOoT2WCFwY,30280
79
+ application_sdk/observability/metrics_adaptor.py,sha256=555Z8AaABrD4whqkr4sF5ddE5mtToZIecTezpS8bWv4,14008
80
+ application_sdk/observability/models.py,sha256=zAVhk4cKMCKco_9yFBZR0dh31VqeAhO2B1GCe2wcGNg,3847
78
81
  application_sdk/observability/observability.py,sha256=O2rBal_0pmFRen7Yx4c4dSH1NyiT937b4bY2w63q-4U,23751
82
+ application_sdk/observability/segment_client.py,sha256=Ny2lxdl7lek9_oNP1nduRGNzziy5kb3fQ72nLpHjewI,15540
79
83
  application_sdk/observability/traces_adaptor.py,sha256=0eQJPN-tYA_dV8D3uEa5ZiX9g12NDuLnPaFuQMVDdL0,18242
80
84
  application_sdk/observability/utils.py,sha256=-02GAFom8Bg4SNyCTNYySmen2dzvLfTu43bqsNq1AH0,3096
81
85
  application_sdk/observability/decorators/observability_decorator.py,sha256=yd6qfrg1MmH5KcZ5Ydzb0RaBzmxx5FrmiI9qwvZx3EU,8963
@@ -94,10 +98,10 @@ application_sdk/server/mcp/server.py,sha256=HG8tFmcc-f9Wj3vZzs2oRoNJzN1s5hwjnKyk
94
98
  application_sdk/services/__init__.py,sha256=H-5HZEPdr53MUfAggyHqHhRXDRLZFZsxvJgWbr257Ds,465
95
99
  application_sdk/services/_utils.py,sha256=0yHqDP6qNb1OT-bX2XRYQPZ5xkGkV13nyRw6GkPlHs8,1136
96
100
  application_sdk/services/atlan_storage.py,sha256=TKzXxu0yXeUcmZehwp8PcnQTC4A9w9RlZ0Fl-Xp1bLE,8509
97
- application_sdk/services/eventstore.py,sha256=wCT921KRzUe3fAWKC-bbM6_OtIJTKpSQrOutPQzMEgs,6745
98
- application_sdk/services/objectstore.py,sha256=dLljCsPPSr24bPKh0l3-xRblofzKVQ4LDfqDrMp8JGc,20819
101
+ application_sdk/services/eventstore.py,sha256=MsRDpnDboSzmh2tyrJBccTPgQvyA3EgeB8JEcGag45Q,10991
102
+ application_sdk/services/objectstore.py,sha256=vnasFrOP0AIUAEW9DuNsemiyPVfzMAhRUfODTd4gbSA,20924
99
103
  application_sdk/services/secretstore.py,sha256=Pmn1WlmHmgaDhWz5OXBB5_rKXQQMyLMzadwZSNKwc6Q,19070
100
- application_sdk/services/statestore.py,sha256=3-afiM3Vsoe1XDYRokdGTB5I5CwOKyieuX5RwIZf77o,9413
104
+ application_sdk/services/statestore.py,sha256=aVEvk_KqJCkqo_gBVk77qnX3MIfCASC0WqdeYBqNimg,9511
101
105
  application_sdk/test_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
102
106
  application_sdk/test_utils/workflow_monitoring.py,sha256=gqq6CsT62GrMt2GqtNSb1iD_-t4MBffQvpO0BXboZek,3490
103
107
  application_sdk/test_utils/e2e/__init__.py,sha256=qswG5goB5Xzt3yQyZsKGq20EnZMZCmXYTe0CK3Qk3xo,10125
@@ -155,8 +159,8 @@ application_sdk/workflows/metadata_extraction/__init__.py,sha256=jHUe_ZBQ66jx8bg
155
159
  application_sdk/workflows/metadata_extraction/sql.py,sha256=6ZaVt84n-8U2ZvR9GR7uIJKv5v8CuyQjhlnoRJvDszc,12435
156
160
  application_sdk/workflows/query_extraction/__init__.py,sha256=n066_CX5RpJz6DIxGMkKS3eGSRg03ilaCtsqfJWQb7Q,117
157
161
  application_sdk/workflows/query_extraction/sql.py,sha256=kT_JQkLCRZ44ZpaC4QvPL6DxnRIIVh8gYHLqRbMI-hA,4826
158
- atlan_application_sdk-2.3.0.dist-info/METADATA,sha256=F-6xR-DchbERcVzifQhz_M4jjUhcYke0tZhe3vIwHao,6014
159
- atlan_application_sdk-2.3.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
160
- atlan_application_sdk-2.3.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
161
- atlan_application_sdk-2.3.0.dist-info/licenses/NOTICE,sha256=A-XVVGt3KOYuuMmvSMIFkg534F1vHiCggEBp4Ez3wGk,1041
162
- atlan_application_sdk-2.3.0.dist-info/RECORD,,
162
+ atlan_application_sdk-2.3.2.dist-info/METADATA,sha256=UkJTSVogF_LaR_OFCl4BFODCJhw0OSbLT4jxzv0W2zs,6325
163
+ atlan_application_sdk-2.3.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
164
+ atlan_application_sdk-2.3.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
165
+ atlan_application_sdk-2.3.2.dist-info/licenses/NOTICE,sha256=A-XVVGt3KOYuuMmvSMIFkg534F1vHiCggEBp4Ez3wGk,1041
166
+ atlan_application_sdk-2.3.2.dist-info/RECORD,,