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.
- hawk_sdk/core/common/utils.py +9 -7
- {hawk_sdk-0.0.12.dist-info → hawk_sdk-0.0.13.dist-info}/METADATA +1 -1
- {hawk_sdk-0.0.12.dist-info → hawk_sdk-0.0.13.dist-info}/RECORD +5 -5
- {hawk_sdk-0.0.12.dist-info → hawk_sdk-0.0.13.dist-info}/WHEEL +0 -0
- {hawk_sdk-0.0.12.dist-info → hawk_sdk-0.0.13.dist-info}/top_level.txt +0 -0
hawk_sdk/core/common/utils.py
CHANGED
|
@@ -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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
+
|
|
@@ -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=
|
|
21
|
-
hawk_sdk-0.0.
|
|
22
|
-
hawk_sdk-0.0.
|
|
23
|
-
hawk_sdk-0.0.
|
|
24
|
-
hawk_sdk-0.0.
|
|
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,,
|
|
File without changes
|
|
File without changes
|