kerykeion 4.24.5__py3-none-any.whl → 4.24.6__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 kerykeion might be problematic. Click here for more details.

@@ -9,6 +9,7 @@ import logging
9
9
  from pathlib import Path
10
10
  from typing import Dict, Union
11
11
  from kerykeion.kr_types import KerykeionSettingsModel
12
+ import functools
12
13
 
13
14
 
14
15
  def get_settings(new_settings_file: Union[Path, None, KerykeionSettingsModel, dict] = None) -> KerykeionSettingsModel:
@@ -47,8 +48,7 @@ def get_settings(new_settings_file: Union[Path, None, KerykeionSettingsModel, di
47
48
  settings_file = Path(__file__).parent / "kr.config.json"
48
49
 
49
50
  logging.debug(f"Kerykeion config file path: {settings_file}")
50
- with open(settings_file, "r", encoding="utf8") as f:
51
- settings_dict = load(f)
51
+ settings_dict = load_settings_file(settings_file)
52
52
 
53
53
  return KerykeionSettingsModel(**settings_dict)
54
54
 
@@ -69,6 +69,23 @@ def merge_settings(settings: KerykeionSettingsModel, new_settings: Dict) -> Kery
69
69
  return KerykeionSettingsModel(**new_settings_dict)
70
70
 
71
71
 
72
+ @functools.lru_cache
73
+ def load_settings_file(settings_file_path: str) -> dict:
74
+ """
75
+ This function is used to load the settings file from a path.
76
+
77
+ Args:
78
+ settings_file (Path): The path of the settings file
79
+
80
+ Returns:
81
+ dict: The settings dict
82
+ """
83
+ with open(settings_file_path, "r", encoding="utf8") as f:
84
+ settings_dict = load(f)
85
+
86
+ return settings_dict
87
+
88
+
72
89
  if __name__ == "__main__":
73
90
  from kerykeion.utilities import setup_logging
74
91
  setup_logging(level="debug")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kerykeion
3
- Version: 4.24.5
3
+ Version: 4.24.6
4
4
  Summary: A python library for astrology.
5
5
  Home-page: https://www.kerykeion.net/
6
6
  License: AGPL-3.0
@@ -31,13 +31,13 @@ kerykeion/relationship_score/relationship_score_factory.py,sha256=NbQZ7jh2-7CGk8
31
31
  kerykeion/report.py,sha256=snqnrJzb89q2ixL74qS9ksvzNSh_WXtZ_haBOIvHYeY,2814
32
32
  kerykeion/settings/__init__.py,sha256=QQNFCl7sgN27MKaVscqtpPk10HGz4wZS3I_7KEGMaVA,69
33
33
  kerykeion/settings/config_constants.py,sha256=OUi28L2l8s09Df3GHiQUiBZuTjOdfL4A5zSRNqBRHc8,1255
34
- kerykeion/settings/kerykeion_settings.py,sha256=WZyiC4uwpjnTmoDGWORYLIk9rIpJ3EuLdjFw6eUuylo,2554
34
+ kerykeion/settings/kerykeion_settings.py,sha256=7GCGUzcctEg5uyWlzRk2YIotJSkCZDOVAo_CXwgMeK4,2934
35
35
  kerykeion/settings/kr.config.json,sha256=01xm7VOmGxMa86VM8VL8giYmnDTkfo2aE9qjIfIouM0,21113
36
36
  kerykeion/sweph/README.md,sha256=L7FtNAJTWtrZNGKa8MX87SjduFYPYxwWhaI5fmtzNZo,73
37
37
  kerykeion/sweph/seas_18.se1,sha256=X9nCqhZU43wJpq61WAdueVQJt9xL2UjrwPqn1Kdoa1s,223002
38
38
  kerykeion/utilities.py,sha256=vuEDWs5Htl2zi6_3flLvlAsFC9YT9LaOQDpRirFf3Cg,11160
39
- kerykeion-4.24.5.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
40
- kerykeion-4.24.5.dist-info/METADATA,sha256=SQQBttcLzWkQC7z0ttrtaM4X-LD37p25Cdf9TqFzVNk,17722
41
- kerykeion-4.24.5.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
42
- kerykeion-4.24.5.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
43
- kerykeion-4.24.5.dist-info/RECORD,,
39
+ kerykeion-4.24.6.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
40
+ kerykeion-4.24.6.dist-info/METADATA,sha256=Rze6oYdkOHnoeU0CT3xE19yGb4G1CMb4r2KJQ8B73gI,17722
41
+ kerykeion-4.24.6.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
42
+ kerykeion-4.24.6.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
43
+ kerykeion-4.24.6.dist-info/RECORD,,