atlan-application-sdk 0.1.1rc31__py3-none-any.whl → 0.1.1rc32__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.
@@ -36,7 +36,7 @@ APPLICATION_NAME = os.getenv("ATLAN_APPLICATION_NAME", "default")
36
36
  #: Name of the deployment, used to distinguish between different deployments of the same application
37
37
  DEPLOYMENT_NAME = os.getenv("ATLAN_DEPLOYMENT_NAME", LOCAL_ENVIRONMENT)
38
38
  #: Host address for the application's HTTP server
39
- APP_HOST = str(os.getenv("ATLAN_APP_HTTP_HOST", "localhost"))
39
+ APP_HOST = str(os.getenv("ATLAN_APP_HTTP_HOST", "0.0.0.0"))
40
40
  #: Port number for the application's HTTP server
41
41
  APP_PORT = int(os.getenv("ATLAN_APP_HTTP_PORT", "8000"))
42
42
  #: Tenant ID for multi-tenant applications
@@ -51,7 +51,12 @@ class ParquetInput(Input):
51
51
  Returns:
52
52
  Optional[str]: Path to the downloaded local file.
53
53
  """
54
- parquet_files = glob.glob(local_file_path)
54
+ # if the path is a directory, then check if the directory has any parquet files
55
+ parquet_files = []
56
+ if os.path.isdir(local_file_path):
57
+ parquet_files = glob.glob(os.path.join(local_file_path, "*.parquet"))
58
+ else:
59
+ parquet_files = glob.glob(local_file_path)
55
60
  if not parquet_files:
56
61
  if self.input_prefix:
57
62
  logger.info(
@@ -162,10 +167,9 @@ class ParquetInput(Input):
162
167
  await self.download_files(path)
163
168
  yield daft.read_parquet(path)
164
169
  else:
165
- path = f"{self.path}/*.parquet"
166
- if self.input_prefix and path:
167
- await self.download_files(path)
168
- yield daft.read_parquet(path)
170
+ if self.path and self.input_prefix:
171
+ await self.download_files(self.path)
172
+ yield daft.read_parquet(f"{self.path}/*.parquet")
169
173
 
170
174
  except Exception as error:
171
175
  logger.error(
@@ -0,0 +1,28 @@
1
+ from hypothesis import strategies as st
2
+
3
+ # Strategy for generating safe file path components
4
+ safe_path_strategy = st.text(
5
+ alphabet=st.characters(),
6
+ )
7
+
8
+ # Strategy for generating file names
9
+ file_name_strategy = st.builds(lambda name: f"{name}.parquet", name=safe_path_strategy)
10
+
11
+ # Strategy for generating lists of file names
12
+ file_names_strategy = st.lists(file_name_strategy, unique=True)
13
+
14
+ # Strategy for generating input prefixes
15
+ input_prefix_strategy = safe_path_strategy
16
+
17
+ # Strategy for generating chunk sizes
18
+ chunk_size_strategy = st.one_of(st.none(), st.integers(min_value=1, max_value=1000000))
19
+
20
+ # Strategy for generating complete ParquetInput configurations
21
+ parquet_input_config_strategy = st.fixed_dictionaries(
22
+ {
23
+ "path": safe_path_strategy,
24
+ "chunk_size": chunk_size_strategy,
25
+ "input_prefix": st.one_of(st.none(), input_prefix_strategy),
26
+ "file_names": st.one_of(st.none(), file_names_strategy),
27
+ }
28
+ )
@@ -2,4 +2,4 @@
2
2
  Version information for the application_sdk package.
3
3
  """
4
4
 
5
- __version__ = "0.1.1rc31"
5
+ __version__ = "0.1.1rc32"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atlan-application-sdk
3
- Version: 0.1.1rc31
3
+ Version: 0.1.1rc32
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
@@ -1,6 +1,6 @@
1
1
  application_sdk/__init__.py,sha256=2e2mvmLJ5dxmJGPELtb33xwP-j6JMdoIuqKycEn7hjg,151
2
- application_sdk/constants.py,sha256=jN3-PvCYg4Ko45SyJWlFt3ilKypUzY395J0FB1x4XbU,9488
3
- application_sdk/version.py,sha256=XxupFe5OZ0YH8PhpwRAl6T6br2R7lWHBhTVe0h81h9U,88
2
+ application_sdk/constants.py,sha256=_Fmk9PgpM68chPDHHkgrs4Zg2KK4UCqqg7Oj9_u3WVo,9486
3
+ application_sdk/version.py,sha256=ifHNi-zFUduvn5OEE1VTXtr426-rLzTEQ6lB9WnnQbk,88
4
4
  application_sdk/worker.py,sha256=dZLxPkAieCSw7XEWxzL-FRk0QAZm7vXQBICjZODy3B4,7488
5
5
  application_sdk/activities/__init__.py,sha256=EH5VTHcfGykIX7V1HsG0J1Z-1FbJEXTQOET0HdzFDjU,9519
6
6
  application_sdk/activities/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -50,7 +50,7 @@ application_sdk/inputs/__init__.py,sha256=_d-cUhcDyoJTJR3PdQkC831go6VDw9AM6Bg7-q
50
50
  application_sdk/inputs/iceberg.py,sha256=xiv1kNtVx1k0h3ZJbJeXjZwdfBGSy9j9orYP_AyCYlI,2756
51
51
  application_sdk/inputs/json.py,sha256=J1CVz0YGQHDyq840TyoBHE7Baua2yIFHzsrybiZbeWk,6079
52
52
  application_sdk/inputs/objectstore.py,sha256=uOJW0uB3FrDmnyHFhAd23QOq3MKrAzhYdKCszdpMeF8,8219
53
- application_sdk/inputs/parquet.py,sha256=Hsi6Nz_KwxFMB6DcHSQov5y_hRkoeN7e4xfpYwogveo,6346
53
+ application_sdk/inputs/parquet.py,sha256=j1O5uYZ2ok28iPYFpMoltKzJTDGmht7qoEjRKQ48P8E,6590
54
54
  application_sdk/inputs/secretstore.py,sha256=0H81CkbKj1KTU_wlPofpsAvPHs9YaOuKbRBmLRdiiNw,4583
55
55
  application_sdk/inputs/sql_query.py,sha256=1EREgea6kKNaMIyX2HLJgbJ07rtAgLasd9NyvDcdZok,10636
56
56
  application_sdk/inputs/statestore.py,sha256=ORWnv8ZCqC1wT4vlW4v5EemJT4oQ3t_DlpjKDAgTRTs,3117
@@ -99,6 +99,7 @@ application_sdk/test_utils/hypothesis/strategies/handlers/sql/sql_metadata.py,sh
99
99
  application_sdk/test_utils/hypothesis/strategies/handlers/sql/sql_preflight.py,sha256=e9uo6Bx5w_ZAEu6bDTWbMbmzqB0MYl2dH-JlXg3bkV8,2648
100
100
  application_sdk/test_utils/hypothesis/strategies/inputs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
101
101
  application_sdk/test_utils/hypothesis/strategies/inputs/json_input.py,sha256=9mPI585J4tfQTZiM_uoFXCq7qrLML7jwH5eDm_mzvm4,749
102
+ application_sdk/test_utils/hypothesis/strategies/inputs/parquet_input.py,sha256=qOi5En011KiOWAusP6dCvzr1rtC_sc2IkWfj7hWvSh0,950
102
103
  application_sdk/test_utils/hypothesis/strategies/outputs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
103
104
  application_sdk/test_utils/hypothesis/strategies/outputs/json_output.py,sha256=p9wotUJwc-Wmm54_qVG5Ivp_mgl7YTeAcQfC6RXlxCc,1835
104
105
  application_sdk/test_utils/hypothesis/strategies/outputs/statestore.py,sha256=gmYBwePNoSI_pl2WTXOClgkruzRwkOX_1SmBaUTha0c,2903
@@ -133,8 +134,8 @@ application_sdk/workflows/metadata_extraction/__init__.py,sha256=jHUe_ZBQ66jx8bg
133
134
  application_sdk/workflows/metadata_extraction/sql.py,sha256=_NhszxIgmcQI6lVpjJoyJRFLwPYvJw1Dyqox_m9K2RA,11947
134
135
  application_sdk/workflows/query_extraction/__init__.py,sha256=n066_CX5RpJz6DIxGMkKS3eGSRg03ilaCtsqfJWQb7Q,117
135
136
  application_sdk/workflows/query_extraction/sql.py,sha256=kT_JQkLCRZ44ZpaC4QvPL6DxnRIIVh8gYHLqRbMI-hA,4826
136
- atlan_application_sdk-0.1.1rc31.dist-info/METADATA,sha256=_Z91665V1flLl-gpTaVHsY3_1KYbmu_mucYaPc-yE78,5473
137
- atlan_application_sdk-0.1.1rc31.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
138
- atlan_application_sdk-0.1.1rc31.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
139
- atlan_application_sdk-0.1.1rc31.dist-info/licenses/NOTICE,sha256=A-XVVGt3KOYuuMmvSMIFkg534F1vHiCggEBp4Ez3wGk,1041
140
- atlan_application_sdk-0.1.1rc31.dist-info/RECORD,,
137
+ atlan_application_sdk-0.1.1rc32.dist-info/METADATA,sha256=bN4buUiRRKto73NmQ8JsMnKQrWS3CqJMr5m1huc-4u8,5473
138
+ atlan_application_sdk-0.1.1rc32.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
139
+ atlan_application_sdk-0.1.1rc32.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
140
+ atlan_application_sdk-0.1.1rc32.dist-info/licenses/NOTICE,sha256=A-XVVGt3KOYuuMmvSMIFkg534F1vHiCggEBp4Ez3wGk,1041
141
+ atlan_application_sdk-0.1.1rc32.dist-info/RECORD,,