hawk-sdk 0.0.12__tar.gz → 0.0.13__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.

Potentially problematic release.


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

Files changed (29) hide show
  1. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/PKG-INFO +1 -1
  2. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/core/common/utils.py +9 -7
  3. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk.egg-info/PKG-INFO +1 -1
  4. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/setup.py +1 -1
  5. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/README.md +0 -0
  6. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/__init__.py +0 -0
  7. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/api/__init__.py +0 -0
  8. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/api/equities/__init__.py +0 -0
  9. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/api/equities/main.py +0 -0
  10. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/api/equities/repository.py +0 -0
  11. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/api/equities/service.py +0 -0
  12. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/api/futures/__init__.py +0 -0
  13. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/api/futures/main.py +0 -0
  14. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/api/futures/repository.py +0 -0
  15. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/api/futures/service.py +0 -0
  16. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/api/system/__init__.py +0 -0
  17. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/api/system/main.py +0 -0
  18. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/api/system/repository.py +0 -0
  19. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/api/system/service.py +0 -0
  20. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/core/__init__.py +0 -0
  21. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/core/common/__init__.py +0 -0
  22. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/core/common/base_enum.py +0 -0
  23. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/core/common/constants.py +0 -0
  24. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk/core/common/data_object.py +0 -0
  25. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk.egg-info/SOURCES.txt +0 -0
  26. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk.egg-info/dependency_links.txt +0 -0
  27. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk.egg-info/requires.txt +0 -0
  28. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/hawk_sdk.egg-info/top_level.txt +0 -0
  29. {hawk_sdk-0.0.12 → hawk_sdk-0.0.13}/setup.cfg +0 -0
@@ -1,5 +1,5 @@
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
@@ -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,5 +1,5 @@
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
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='hawk-sdk',
5
- version='0.0.12',
5
+ version='0.0.13',
6
6
  packages=find_packages(),
7
7
  install_requires=[
8
8
  'google-cloud-bigquery',
File without changes
File without changes