hawk-sdk 0.0.12__py3-none-any.whl → 0.0.13__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.

Potentially problematic release.


This version of hawk-sdk might be problematic. Click here for more details.

@@ -8,14 +8,16 @@ from hawk_sdk.core.common.constants import PROJECT_ID
8
8
 
9
9
 
10
10
  def get_bigquery_client() -> bigquery.Client:
11
- if 'GOOGLE_APPLICATION_CREDENTIALS' in os.environ:
12
- # Initialize the client using the json file in the environment variable
13
- return bigquery.Client(project=PROJECT_ID)
14
-
15
- else:
16
- # Load the service account credentials from the JSON string
17
- service_account_json = os.environ.get('SERVICE_ACCOUNT_JSON')
11
+ service_account_json = os.environ.get('SERVICE_ACCOUNT_JSON')
12
+ if service_account_json:
13
+ # Use credentials provided in SERVICE_ACCOUNT_JSON
18
14
  credentials = service_account.Credentials.from_service_account_info(
19
15
  json.loads(service_account_json)
20
16
  )
21
17
  return bigquery.Client(project=PROJECT_ID, credentials=credentials)
18
+ else:
19
+ # Rely on Application Default Credentials (ADC),
20
+ # which will automatically use GOOGLE_APPLICATION_CREDENTIALS if set,
21
+ # or use the built-in credentials if running in GCP.
22
+ return bigquery.Client(project=PROJECT_ID)
23
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hawk-sdk
3
- Version: 0.0.12
3
+ Version: 0.0.13
4
4
  Requires-Dist: google-cloud-bigquery
5
5
  Requires-Dist: pandas
6
6
 
@@ -17,8 +17,8 @@ hawk_sdk/core/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
17
17
  hawk_sdk/core/common/base_enum.py,sha256=ZgC8gZjTzsoJzzdgN2DjYk3dVL_uM2Stuaky5bo6GuQ,267
18
18
  hawk_sdk/core/common/constants.py,sha256=KmsNfRVCwGeXEBHfo3TzSaDYJDMtnL-YEQKsO1DnWV8,33
19
19
  hawk_sdk/core/common/data_object.py,sha256=f4YO415Zz-lm3QYJQ3sJ4ugH9ZX9Dc7T-JvO4IdeyOw,1073
20
- hawk_sdk/core/common/utils.py,sha256=bxF-iJzbqXGYtQKElH6k5-bSsdcvft0o51G9slZ1grI,745
21
- hawk_sdk-0.0.12.dist-info/METADATA,sha256=dpigN7LmvKT5jKl2_IggsJ61OcMhWlyI4De3fdnBuR0,113
22
- hawk_sdk-0.0.12.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
23
- hawk_sdk-0.0.12.dist-info/top_level.txt,sha256=aSjbudHcWSYsKXH9Wg0L1ltJfDOHXzjYFPO3v3cP-SE,9
24
- hawk_sdk-0.0.12.dist-info/RECORD,,
20
+ hawk_sdk/core/common/utils.py,sha256=yEMtrMYA7bv7cbIqa6sGWjQOAR3i0BOP2rh68PRMUe4,822
21
+ hawk_sdk-0.0.13.dist-info/METADATA,sha256=iKHFHzwNH8Ww3o00zcGooAhOuT24LvADQE90JPMVn3s,113
22
+ hawk_sdk-0.0.13.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
23
+ hawk_sdk-0.0.13.dist-info/top_level.txt,sha256=aSjbudHcWSYsKXH9Wg0L1ltJfDOHXzjYFPO3v3cP-SE,9
24
+ hawk_sdk-0.0.13.dist-info/RECORD,,