kuhl-haus-mdp 0.0.1__py3-none-any.whl → 0.1.0__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.
@@ -10,16 +10,26 @@ logger = logging.getLogger(__name__)
10
10
 
11
11
 
12
12
  def get_massive_api_key():
13
+ # MASSIVE_API_KEY environment variable takes precedence over POLYGON_API_KEY
13
14
  logger.info("Getting Massive API key...")
14
15
  api_key = os.environ.get("MASSIVE_API_KEY")
16
+
17
+ # If MASSIVE_API_KEY is not set, try POLYGON_API_KEY
15
18
  if not api_key:
16
- logger.info("MASSIVE_API_KEY environment variable not set; trying Massive API key...")
19
+ logger.info("MASSIVE_API_KEY environment variable not set; trying POLYGON_API_KEY...")
17
20
  api_key = os.environ.get("POLYGON_API_KEY")
21
+
22
+ # If POLYGON_API_KEY is not set, try reading from file
18
23
  if not api_key:
19
24
  logger.info("POLYGON_API_KEY environment variable not set; trying Massive API key file...")
20
- api_key_path = '/app/polygon_api_key.txt'
21
- with open(api_key_path, 'r') as f:
22
- api_key = f.read().strip()
25
+ api_key_path = '/app/massive_api_key.txt'
26
+ try:
27
+ with open(api_key_path, 'r') as f:
28
+ api_key = f.read().strip()
29
+ except FileNotFoundError:
30
+ logger.info(f"No Massive API key file found at {api_key_path}")
31
+
32
+ # Raise error if neither POLYGON_API_KEY nor MASSIVE_API_KEY are set
23
33
  if not api_key:
24
34
  logger.error("No Massive API key found")
25
35
  raise ValueError("MASSIVE_API_KEY environment variable not set")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kuhl-haus-mdp
3
- Version: 0.0.1
3
+ Version: 0.1.0
4
4
  Summary: Market data processing pipeline for stock market scanner
5
5
  Author-Email: Tom Pounders <git@oldschool.engineer>
6
6
  License: The MIT License (MIT)
@@ -62,7 +62,7 @@ Description-Content-Type: text/markdown
62
62
  [![PyPI](https://img.shields.io/pypi/v/kuhl-haus-mdp.svg)](https://pypi.org/project/kuhl-haus-mdp/)
63
63
  [![Downloads](https://static.pepy.tech/badge/kuhl-haus-mdp/month)](https://pepy.tech/project/kuhl-haus-mdp)
64
64
  [![Build Status](https://github.com/kuhl-haus/kuhl-haus-mdp/actions/workflows/publish-to-pypi.yml/badge.svg)](https://github.com/kuhl-haus/kuhl-haus-mdp/actions/workflows/publish-to-pypi.yml)
65
- [![CodeQL](https://github.com/kuhl-haus/kuhl-haus-mdp/workflows/CodeQL/badge.svg)](https://github.com/kuhl-haus/kuhl-haus-mdp/actions/workflows/github-code-scanning/codeql/)
65
+ [![CodeQL Advanced](https://github.com/kuhl-haus/kuhl-haus-mdp/actions/workflows/codeql.yml/badge.svg)](https://github.com/kuhl-haus/kuhl-haus-mdp/actions/workflows/codeql.yml)
66
66
  [![codecov](https://codecov.io/gh/kuhl-haus/kuhl-haus-mdp/branch/mainline/graph/badge.svg)](https://codecov.io/gh/kuhl-haus/kuhl-haus-mdp)
67
67
  [![GitHub issues](https://img.shields.io/github/issues/kuhl-haus/kuhl-haus-mdp)](https://github.com/kuhl-haus/kuhl-haus-mdp/issues)
68
68
  [![GitHub pull requests](https://img.shields.io/github/issues-pr/kuhl-haus/kuhl-haus-mdp)](https://github.com/kuhl-haus/kuhl-haus-mdp/pulls)
@@ -14,7 +14,7 @@ kuhl_haus/mdp/integ/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
14
14
  kuhl_haus/mdp/integ/massive_data_listener.py,sha256=fPEYc6zZzHzFFjbP3zFInajKtEGInj8UQKKo3nKQEwQ,5098
15
15
  kuhl_haus/mdp/integ/massive_data_processor.py,sha256=9I0tH9sZNs9Y0TyKIBKix_qlEksEZt5NRfP-Zf3FovE,8708
16
16
  kuhl_haus/mdp/integ/massive_data_queues.py,sha256=zC_uV2vwZCMyVerDQ18RAQwIMMF75iK4qUSqwuWqgwc,5050
17
- kuhl_haus/mdp/integ/utils.py,sha256=4YVJQjfiygM_yXWPuwmNMDuKBQ_ZynSFy5cIO09AKTM,905
17
+ kuhl_haus/mdp/integ/utils.py,sha256=9JEpl2yr2LghOLrJUDxi-4dtDK3DZ1wBTZ1uxBJsFbQ,1309
18
18
  kuhl_haus/mdp/integ/web_socket_message_serde.py,sha256=jPXMVO-4RaZ8yrnqfgckeHEv_96_9yXj_keMq42NqJY,5456
19
19
  kuhl_haus/mdp/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  kuhl_haus/mdp/models/market_data_analyzer_result.py,sha256=iICb5GVCtuqARNbR1JNCAfbxMijM3uppDNdL8_FB3eI,422
@@ -22,8 +22,8 @@ kuhl_haus/mdp/models/market_data_cache_keys.py,sha256=5iScBMhVQaG3p9P45veE-uRT7c
22
22
  kuhl_haus/mdp/models/market_data_pubsub_keys.py,sha256=PEIPXK9jBehJB7G4pqoSuQZcfMZgOQq8Yho1itqv-1A,1306
23
23
  kuhl_haus/mdp/models/market_data_scanner_names.py,sha256=BYn1C0rYgGF1Sq583BkHADKUu-28ytNZQ-XgptuCH-Y,260
24
24
  kuhl_haus/mdp/models/massive_data_queue.py,sha256=MfYBcjVc4Fi61DWIvvhhWLUOiLmRpE9egtW-2KH6FTE,188
25
- kuhl_haus_mdp-0.0.1.dist-info/METADATA,sha256=lGEPOXMMCCEbQsffzCI92WbeQ4QwiPL6LkiZrL69TX0,4258
26
- kuhl_haus_mdp-0.0.1.dist-info/WHEEL,sha256=tsUv_t7BDeJeRHaSrczbGeuK-TtDpGsWi_JfpzD255I,90
27
- kuhl_haus_mdp-0.0.1.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
28
- kuhl_haus_mdp-0.0.1.dist-info/licenses/LICENSE.txt,sha256=DRkJftAJcMqoTkQ_Y6-HtKj3nm4pZah_p8XBZiYnw-c,1079
29
- kuhl_haus_mdp-0.0.1.dist-info/RECORD,,
25
+ kuhl_haus_mdp-0.1.0.dist-info/METADATA,sha256=arT72OYux7JnmZIDfJ0K0wYbNBRfysS7HlZO3-wABMU,4261
26
+ kuhl_haus_mdp-0.1.0.dist-info/WHEEL,sha256=tsUv_t7BDeJeRHaSrczbGeuK-TtDpGsWi_JfpzD255I,90
27
+ kuhl_haus_mdp-0.1.0.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
28
+ kuhl_haus_mdp-0.1.0.dist-info/licenses/LICENSE.txt,sha256=DRkJftAJcMqoTkQ_Y6-HtKj3nm4pZah_p8XBZiYnw-c,1079
29
+ kuhl_haus_mdp-0.1.0.dist-info/RECORD,,