kerykeion 4.17.2__tar.gz → 4.18.1__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 kerykeion might be problematic. Click here for more details.

Files changed (42) hide show
  1. {kerykeion-4.17.2 → kerykeion-4.18.1}/PKG-INFO +2 -2
  2. {kerykeion-4.17.2 → kerykeion-4.18.1}/README.md +1 -1
  3. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/__init__.py +2 -1
  4. kerykeion-4.18.1/kerykeion/aspects/aspects_utils.py +91 -0
  5. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/aspects/natal_aspects.py +23 -24
  6. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/aspects/synastry_aspects.py +21 -26
  7. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/charts/kerykeion_chart_svg.py +17 -14
  8. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/ephemeris_data.py +16 -16
  9. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/kr_types/kr_literals.py +6 -1
  10. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/kr_types/kr_models.py +19 -2
  11. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/kr_types/settings_models.py +1 -13
  12. kerykeion-4.18.1/kerykeion/relationship_score/__init__.py +2 -0
  13. kerykeion-4.18.1/kerykeion/relationship_score/relationship_score.py +175 -0
  14. kerykeion-4.18.1/kerykeion/relationship_score/relationship_score_factory.py +275 -0
  15. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/settings/kr.config.json +44 -30
  16. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/utilities.py +4 -1
  17. {kerykeion-4.17.2 → kerykeion-4.18.1}/pyproject.toml +1 -1
  18. kerykeion-4.17.2/kerykeion/aspects/aspects_utils.py +0 -176
  19. kerykeion-4.17.2/kerykeion/relationship_score.py +0 -206
  20. {kerykeion-4.17.2 → kerykeion-4.18.1}/LICENSE +0 -0
  21. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/aspects/__init__.py +0 -0
  22. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/astrological_subject.py +0 -0
  23. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/charts/__init__.py +0 -0
  24. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/charts/charts_utils.py +0 -0
  25. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/charts/draw_planets.py +0 -0
  26. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/charts/templates/aspect_grid_only.xml +0 -0
  27. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/charts/templates/chart.xml +0 -0
  28. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/charts/templates/wheel_only.xml +0 -0
  29. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/charts/themes/classic.css +0 -0
  30. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/charts/themes/dark-high-contrast.css +0 -0
  31. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/charts/themes/dark.css +0 -0
  32. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/charts/themes/light.css +0 -0
  33. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/enums.py +0 -0
  34. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/fetch_geonames.py +0 -0
  35. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/kr_types/__init__.py +0 -0
  36. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/kr_types/chart_types.py +0 -0
  37. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/kr_types/kerykeion_exception.py +0 -0
  38. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/report.py +0 -0
  39. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/settings/__init__.py +0 -0
  40. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/settings/kerykeion_settings.py +0 -0
  41. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/sweph/README.md +0 -0
  42. {kerykeion-4.17.2 → kerykeion-4.18.1}/kerykeion/sweph/seas_18.se1 +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kerykeion
3
- Version: 4.17.2
3
+ Version: 4.18.1
4
4
  Summary: A python library for astrology.
5
5
  Home-page: https://www.kerykeion.net/
6
6
  License: AGPL-3.0
@@ -194,7 +194,7 @@ You can change the language of the SVG by passing the `chart_language` parameter
194
194
  ```python
195
195
  first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB", chart_language="ES")
196
196
  ```
197
- More details [here](https://www.kerykeion.net/docs/examples/change-language).
197
+ More details [here](https://www.kerykeion.net/docs/examples/chart-language).
198
198
 
199
199
  ## Report
200
200
 
@@ -157,7 +157,7 @@ You can change the language of the SVG by passing the `chart_language` parameter
157
157
  ```python
158
158
  first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB", chart_language="ES")
159
159
  ```
160
- More details [here](https://www.kerykeion.net/docs/examples/change-language).
160
+ More details [here](https://www.kerykeion.net/docs/examples/chart-language).
161
161
 
162
162
  ## Report
163
163
 
@@ -9,7 +9,8 @@ This is part of Kerykeion (C) 2024 Giacomo Battaglia
9
9
  from .astrological_subject import AstrologicalSubject
10
10
  from .charts.kerykeion_chart_svg import KerykeionChartSVG
11
11
  from .kr_types import *
12
- from .relationship_score import RelationshipScore
12
+ from .relationship_score.relationship_score import RelationshipScore
13
+ from .relationship_score.relationship_score_factory import RelationshipScoreFactory
13
14
  from .aspects import SynastryAspects, NatalAspects
14
15
  from .report import Report
15
16
  from .settings import KerykeionSettingsModel, get_settings
@@ -0,0 +1,91 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ This is part of Kerykeion (C) 2024 Giacomo Battaglia
4
+ """
5
+ # TODO: Better documentation and unit tests
6
+
7
+ from kerykeion import AstrologicalSubject
8
+ from kerykeion.settings import KerykeionSettingsModel
9
+ from swisseph import difdeg2n
10
+ from typing import Union
11
+ from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
12
+ from kerykeion.kr_types.settings_models import KerykeionSettingsCelestialPointModel, KerykeionSettingsAspectModel
13
+
14
+
15
+ def get_aspect_from_two_points(
16
+ aspects_settings: Union[list[KerykeionSettingsAspectModel], list[dict]],
17
+ point_one: Union[float, int],
18
+ point_two: Union[float, int],
19
+ ):
20
+ """
21
+ Utility function to calculate the aspects between two points.
22
+
23
+ Args:
24
+ aspects_settings (dict): Dictionary containing aspect settings.
25
+ point_one (Union[float, int]): First point.
26
+ point_two (Union[float, int]): Second point.
27
+
28
+ Returns:
29
+ dict: Dictionary containing the aspect details.
30
+ """
31
+ distance = abs(difdeg2n(point_one, point_two))
32
+ diff = abs(point_one - point_two)
33
+
34
+ for aid, aspect in enumerate(aspects_settings):
35
+ aspect_degree = aspect["degree"] # type: ignore
36
+ aspect_orb = aspect["orb"] # type: ignore
37
+
38
+ if (aspect_degree - aspect_orb) <= int(distance) <= (aspect_degree + aspect_orb):
39
+ name = aspect["name"] # type: ignore
40
+ aspect_degrees = aspect_degree
41
+ verdict = True
42
+ break
43
+ else:
44
+ verdict = False
45
+ name = None
46
+ aspect_degrees = 0
47
+ aid = None # type: ignore
48
+
49
+ return {
50
+ "verdict": verdict,
51
+ "name": name,
52
+ "orbit": distance - aspect_degrees,
53
+ "distance": distance - aspect_degrees,
54
+ "aspect_degrees": aspect_degrees,
55
+ "aid": aid,
56
+ "diff": diff,
57
+ }
58
+
59
+
60
+ def planet_id_decoder(planets_settings: list[KerykeionSettingsCelestialPointModel], name: str) -> int:
61
+ """
62
+ Check if the name of the planet is the same in the settings and return
63
+ the correct id for the planet.
64
+ """
65
+ str_name = str(name)
66
+ for planet in planets_settings:
67
+ if planet["name"] == str_name:
68
+ result = planet["id"]
69
+ return result
70
+
71
+ raise ValueError(f"Planet {name} not found in the settings")
72
+
73
+
74
+ def get_active_points_list(
75
+ subject: Union[AstrologicalSubject, AstrologicalSubjectModel], settings: Union[KerykeionSettingsModel, dict]
76
+ ) -> list:
77
+ """
78
+ Given an astrological subject and the settings, return a list of the active points.
79
+ Args:
80
+ subject (AstrologicalSubject): The astrological subject to get the active points from.
81
+ settings (Union[KerykeionSettingsModel, dict]): Settings model o dictionary.
82
+
83
+ Returns:
84
+ list: List of the active points.
85
+ """
86
+ point_list = []
87
+ for planet in settings["celestial_points"]:
88
+ if planet["is_active"] == True:
89
+ point_list.append(subject[planet["name"].lower()])
90
+
91
+ return point_list
@@ -11,7 +11,7 @@ from kerykeion.settings.kerykeion_settings import get_settings
11
11
  from dataclasses import dataclass
12
12
  from functools import cached_property
13
13
  from kerykeion.aspects.aspects_utils import planet_id_decoder, get_aspect_from_two_points, get_active_points_list
14
- from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
14
+ from kerykeion.kr_types.kr_models import AstrologicalSubjectModel, AspectModel
15
15
  from kerykeion.kr_types.settings_models import KerykeionSettingsModel
16
16
 
17
17
 
@@ -35,9 +35,9 @@ class NatalAspects:
35
35
  def __post_init__(self):
36
36
  self.settings = get_settings(self.new_settings_file)
37
37
 
38
- self.celestial_points = self.settings["celestial_points"]
39
- self.aspects_settings = self.settings["aspects"]
40
- self.axes_orbit_settings = self.settings["general_settings"]["axes_orbit"]
38
+ self.celestial_points = self.settings.celestial_points
39
+ self.aspects_settings = self.settings.aspects
40
+ self.axes_orbit_settings = self.settings.general_settings.axes_orbit
41
41
 
42
42
  @cached_property
43
43
  def all_aspects(self):
@@ -55,7 +55,8 @@ class NatalAspects:
55
55
  # Generates the aspects list without repetitions
56
56
  for second in range(first + 1, len(active_points_list)):
57
57
  aspect = get_aspect_from_two_points(
58
- self.aspects_settings, active_points_list[first]["abs_pos"], active_points_list[second]["abs_pos"]
58
+ self.aspects_settings, active_points_list[first]["abs_pos"],
59
+ active_points_list[second]["abs_pos"]
59
60
  )
60
61
 
61
62
  verdict = aspect["verdict"]
@@ -64,27 +65,23 @@ class NatalAspects:
64
65
  aspect_degrees = aspect["aspect_degrees"]
65
66
  aid = aspect["aid"]
66
67
  diff = aspect["diff"]
67
-
68
68
 
69
69
  if verdict == True:
70
- d_asp = {
71
- "p1_name": active_points_list[first]["name"],
72
- "p1_abs_pos": active_points_list[first]["abs_pos"],
73
- "p2_name": active_points_list[second]["name"],
74
- "p2_abs_pos": active_points_list[second]["abs_pos"],
75
- "aspect": name,
76
- "orbit": orbit,
77
- "aspect_degrees": aspect_degrees,
78
- "aid": aid,
79
- "diff": diff,
80
- "p1": planet_id_decoder(self.celestial_points, active_points_list[first]["name"]),
81
- "p2": planet_id_decoder(
82
- self.celestial_points,
83
- active_points_list[second]["name"],
84
- ),
85
- }
86
-
87
- self.all_aspects_list.append(d_asp)
70
+ aspect_model = AspectModel(
71
+ p1_name=active_points_list[first]["name"],
72
+ p1_abs_pos=active_points_list[first]["abs_pos"],
73
+ p2_name=active_points_list[second]["name"],
74
+ p2_abs_pos=active_points_list[second]["abs_pos"],
75
+ aspect=name,
76
+ orbit=orbit,
77
+ aspect_degrees=aspect_degrees,
78
+ aid=aid,
79
+ diff=diff,
80
+ p1=planet_id_decoder(self.celestial_points, active_points_list[first]["name"]),
81
+ p2=planet_id_decoder(self.celestial_points, active_points_list[second]["name"]),
82
+ is_major=self.aspects_settings[aid]["is_major"],
83
+ )
84
+ self.all_aspects_list.append(aspect_model)
88
85
 
89
86
  return self.all_aspects_list
90
87
 
@@ -95,6 +92,7 @@ class NatalAspects:
95
92
  the most important are hardcoded.
96
93
  Set the list with set_points and creating a list with the names
97
94
  or the numbers of the houses.
95
+ The relevant aspects are the ones that are set as active ("is_active") in the settings.
98
96
  """
99
97
 
100
98
  logging.debug("Relevant aspects not already calculated, calculating now...")
@@ -129,6 +127,7 @@ class NatalAspects:
129
127
 
130
128
  if __name__ == "__main__":
131
129
  from kerykeion.utilities import setup_logging
130
+
132
131
  setup_logging(level="debug")
133
132
 
134
133
  johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US")
@@ -11,7 +11,7 @@ from functools import cached_property
11
11
  from kerykeion.aspects.natal_aspects import NatalAspects
12
12
  from kerykeion.settings.kerykeion_settings import get_settings
13
13
  from kerykeion.aspects.aspects_utils import planet_id_decoder, get_aspect_from_two_points, get_active_points_list
14
- from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
14
+ from kerykeion.kr_types.kr_models import AstrologicalSubjectModel, AspectModel
15
15
  from kerykeion.kr_types.settings_models import KerykeionSettingsModel
16
16
  from typing import Union
17
17
 
@@ -25,7 +25,7 @@ class SynastryAspects(NatalAspects):
25
25
  self,
26
26
  kr_object_one: Union[AstrologicalSubject, AstrologicalSubjectModel],
27
27
  kr_object_two: Union[AstrologicalSubject, AstrologicalSubjectModel],
28
- new_settings_file: Union[Path, KerykeionSettingsModel, dict, None] = None
28
+ new_settings_file: Union[Path, KerykeionSettingsModel, dict, None] = None,
29
29
  ):
30
30
  # Subjects
31
31
  self.first_user = kr_object_one
@@ -35,9 +35,9 @@ class SynastryAspects(NatalAspects):
35
35
  self.new_settings_file = new_settings_file
36
36
  self.settings = get_settings(self.new_settings_file)
37
37
 
38
- self.celestial_points = self.settings["celestial_points"]
39
- self.aspects_settings = self.settings["aspects"]
40
- self.axes_orbit_settings = self.settings["general_settings"]["axes_orbit"]
38
+ self.celestial_points = self.settings.celestial_points
39
+ self.aspects_settings = self.settings.aspects
40
+ self.axes_orbit_settings = self.settings.general_settings.axes_orbit
41
41
 
42
42
  # Private variables of the aspects
43
43
  self._all_aspects: Union[list, None] = None
@@ -76,34 +76,29 @@ class SynastryAspects(NatalAspects):
76
76
  aid = aspect["aid"]
77
77
  diff = aspect["diff"]
78
78
 
79
-
80
79
  if verdict == True:
81
- d_asp = {
82
- "p1_name": first_active_points_list[first]["name"],
83
- "p1_abs_pos": first_active_points_list[first]["abs_pos"],
84
- "p2_name": second_active_points_list[second]["name"],
85
- "p2_abs_pos": second_active_points_list[second]["abs_pos"],
86
- "aspect": name,
87
- "orbit": orbit,
88
- "aspect_degrees": aspect_degrees,
89
- "aid": aid,
90
- "diff": diff,
91
- "p1": planet_id_decoder(
92
- self.settings.celestial_points, first_active_points_list[first]["name"]
93
- ),
94
- "p2": planet_id_decoder(
95
- self.settings.celestial_points,
96
- second_active_points_list[second]["name"],
97
- ),
98
- }
99
-
100
- self.all_aspects_list.append(d_asp)
80
+ aspect_model = AspectModel(
81
+ p1_name=first_active_points_list[first]["name"],
82
+ p1_abs_pos=first_active_points_list[first]["abs_pos"],
83
+ p2_name=second_active_points_list[second]["name"],
84
+ p2_abs_pos=second_active_points_list[second]["abs_pos"],
85
+ aspect=name,
86
+ orbit=orbit,
87
+ aspect_degrees=aspect_degrees,
88
+ aid=aid,
89
+ diff=diff,
90
+ p1=planet_id_decoder(self.celestial_points, first_active_points_list[first]["name"]),
91
+ p2=planet_id_decoder(self.celestial_points, second_active_points_list[second]["name"]),
92
+ is_major=self.aspects_settings[aid]["is_major"],
93
+ )
94
+ self.all_aspects_list.append(aspect_model)
101
95
 
102
96
  return self.all_aspects_list
103
97
 
104
98
 
105
99
  if __name__ == "__main__":
106
100
  from kerykeion.utilities import setup_logging
101
+
107
102
  setup_logging(level="debug")
108
103
 
109
104
  john = AstrologicalSubject("John", 1940, 10, 9, 18, 30, "Liverpool")
@@ -15,7 +15,7 @@ from kerykeion.kr_types import KerykeionException, ChartType, KerykeionPointMode
15
15
  from kerykeion.kr_types import ChartTemplateDictionary
16
16
  from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
17
17
  from kerykeion.kr_types.settings_models import KerykeionSettingsCelestialPointModel, KerykeionSettingsModel
18
- from kerykeion.kr_types.kr_literals import KerykeionChartTheme
18
+ from kerykeion.kr_types.kr_literals import KerykeionChartTheme, KerykeionChartLanguage
19
19
  from kerykeion.charts.charts_utils import (
20
20
  draw_zodiac_slice,
21
21
  convert_latitude_coordinate_to_string,
@@ -64,9 +64,12 @@ class KerykeionChartSVG:
64
64
  """
65
65
 
66
66
  # Constants
67
+ _BASIC_CHART_VIEWBOX = "0 0 772.2 546.0"
68
+ _WIDE_CHART_VIEWBOX = "0 0 1060 546.0"
67
69
  _DEFAULT_HEIGHT = 546.0
68
70
  _DEFAULT_FULL_WIDTH = 1200
69
71
  _DEFAULT_NATAL_WIDTH = 772.2
72
+ _PLANET_IN_ZODIAC_EXTRA_POINTS = 10
70
73
 
71
74
  # Set at init
72
75
  first_obj: Union[AstrologicalSubject, AstrologicalSubjectModel]
@@ -85,14 +88,11 @@ class KerykeionChartSVG:
85
88
  first_circle_radius: float
86
89
  second_circle_radius: float
87
90
  third_circle_radius: float
88
- homedir: Path
89
91
  width: Union[float, int]
90
92
  language_settings: dict
91
93
  chart_colors_settings: dict
92
94
  planets_settings: dict
93
95
  aspects_settings: dict
94
- planet_in_zodiac_extra_points: int
95
- chart_settings: dict
96
96
  user: Union[AstrologicalSubject, AstrologicalSubjectModel]
97
97
  available_planets_setting: List[KerykeionSettingsCelestialPointModel]
98
98
  height: float
@@ -110,17 +110,17 @@ class KerykeionChartSVG:
110
110
  new_settings_file: Union[Path, None, KerykeionSettingsModel, dict] = None,
111
111
  theme: Union[KerykeionChartTheme, None] = "classic",
112
112
  double_chart_aspect_grid_type: Literal["list", "table"] = "list",
113
- chart_language: str = "EN",
113
+ chart_language: KerykeionChartLanguage = "EN",
114
114
  ):
115
115
  # Directories:
116
- self.homedir = Path.home()
116
+ home_directory = Path.home()
117
117
  self.new_settings_file = new_settings_file
118
118
  self.chart_language = chart_language
119
119
 
120
120
  if new_output_directory:
121
121
  self.output_directory = Path(new_output_directory)
122
122
  else:
123
- self.output_directory = self.homedir
123
+ self.output_directory = home_directory
124
124
 
125
125
  self.parse_json_settings(new_settings_file)
126
126
  self.chart_type = chart_type
@@ -235,8 +235,6 @@ class KerykeionChartSVG:
235
235
  self.chart_colors_settings = settings["chart_colors"]
236
236
  self.planets_settings = settings["celestial_points"]
237
237
  self.aspects_settings = settings["aspects"]
238
- self.planet_in_zodiac_extra_points = settings["general_settings"]["planet_in_zodiac_extra_points"]
239
- self.chart_settings = settings["chart_settings"]
240
238
 
241
239
  def _draw_zodiac_circle_slices(self, r):
242
240
  """
@@ -272,7 +270,7 @@ class KerykeionChartSVG:
272
270
  The points should include just the standard way of calculating the elements points.
273
271
  """
274
272
 
275
- zodiac = (
273
+ ZODIAC = (
276
274
  {"name": "Ari", "element": "fire"},
277
275
  {"name": "Tau", "element": "earth"},
278
276
  {"name": "Gem", "element": "air"},
@@ -305,9 +303,9 @@ class KerykeionChartSVG:
305
303
  if related_zodiac_signs != []:
306
304
  for e in range(len(related_zodiac_signs)):
307
305
  if int(related_zodiac_signs[e]) == int(cz):
308
- extra_points = self.planet_in_zodiac_extra_points
306
+ extra_points = self._PLANET_IN_ZODIAC_EXTRA_POINTS
309
307
 
310
- ele = zodiac[points_sign[i]]["element"]
308
+ ele = ZODIAC[points_sign[i]]["element"]
311
309
  if ele == "fire":
312
310
  self.fire = self.fire + self.available_planets_setting[i]["element_points"] + extra_points
313
311
 
@@ -366,7 +364,7 @@ class KerykeionChartSVG:
366
364
  template_dict["stringName"] = f"{self.user.name}:" if self.chart_type in ["Synastry", "Transit"] else f'{self.language_settings["info"]}:'
367
365
 
368
366
  # Set viewbox based on chart type
369
- template_dict['viewbox'] = self.chart_settings["basic_chart_viewBox"] if self.chart_type in ["Natal", "ExternalNatal"] else self.chart_settings["wide_chart_viewBox"]
367
+ template_dict['viewbox'] = self._BASIC_CHART_VIEWBOX if self.chart_type in ["Natal", "ExternalNatal"] else self._WIDE_CHART_VIEWBOX
370
368
 
371
369
  # Generate rings and circles based on chart type
372
370
  if self.chart_type in ["Transit", "Synastry"]:
@@ -888,4 +886,9 @@ if __name__ == "__main__":
888
886
  # German Language Chart
889
887
  german_subject = AstrologicalSubject("Albert Einstein", 1879, 3, 14, 11, 30, "Ulm", "DE")
890
888
  german_chart = KerykeionChartSVG(german_subject, chart_language="DE")
891
- german_chart.makeSVG()
889
+ german_chart.makeSVG()
890
+
891
+ # Hindi Language Chart
892
+ hindi_subject = AstrologicalSubject("Amitabh Bachchan", 1942, 10, 11, 4, 0, "Allahabad", "IN")
893
+ hindi_chart = KerykeionChartSVG(hindi_subject, chart_language="HI")
894
+ hindi_chart.makeSVG()
@@ -99,18 +99,25 @@ class EphemerisDataFactory:
99
99
  if len(self.dates_list) > 1000:
100
100
  logging.warning(f"Large number of dates: {len(self.dates_list)}. The calculation may take a while.")
101
101
 
102
- def get_ephemeris_data(self) -> list:
102
+ def get_ephemeris_data(self, as_model: bool = False) -> list:
103
103
  """
104
104
  Generate ephemeris data for the specified date range.
105
105
  The data is structured as a list of dictionaries, where each dictionary contains the date, planets, and houses data.
106
- Eg. [{"date": "2020-01-01T00:00:00", "planets": [{...}, {...}, ...], "houses": [{...}, {...}, ...]}, ...]
106
+ Example:
107
+ [
108
+ {
109
+ "date": "2020-01-01T00:00:00",
110
+ "planets": [{...}, {...}, ...],
111
+ "houses": [{...}, {...}, ...]
112
+ },
113
+ ...
114
+ ]
107
115
 
108
116
  Args:
109
- - as_model: boolean representing if the ephemeris data should be returned as model instances. Default is False.
110
- - as_dict: boolean representing if the ephemeris data should be returned as dictionaries. Default is False.
117
+ - as_model (bool): If True, the ephemeris data will be returned as model instances. Default is False.
111
118
 
112
119
  Returns:
113
- - list of dictionaries representing the ephemeris data.
120
+ - list: A list of dictionaries representing the ephemeris data. If as_model is True, a list of EphemerisDictModel instances is returned.
114
121
  """
115
122
  ephemeris_data_list = []
116
123
  for date in self.dates_list:
@@ -139,17 +146,10 @@ class EphemerisDataFactory:
139
146
 
140
147
  ephemeris_data_list.append({"date": date.isoformat(), "planets": available_planets, "houses": houses_list})
141
148
 
142
- return ephemeris_data_list
143
-
144
- def get_ephemeris_data_as_model(self) -> list[EphemerisDictModel]:
145
- """
146
- Generate ephemeris data as model instances for the specified date range.
147
- The data is structured as a list of EphemerisDictModel instances.
149
+ if as_model:
150
+ return [EphemerisDictModel(**data) for data in ephemeris_data_list]
148
151
 
149
- Returns:
150
- - list of EphemerisDictModel instances representing the ephemeris data.
151
- """
152
- return [EphemerisDictModel(**data) for data in self.get_ephemeris_data()]
152
+ return ephemeris_data_list
153
153
 
154
154
 
155
155
  if "__main__" == __name__:
@@ -170,7 +170,7 @@ if "__main__" == __name__:
170
170
  max_days=None,
171
171
  )
172
172
 
173
- ephemeris_data = factory.get_ephemeris_data_as_model()
173
+ ephemeris_data = factory.get_ephemeris_data(as_model=True)
174
174
  print(ephemeris_data[0])
175
175
  print(len(ephemeris_data))
176
176
 
@@ -104,4 +104,9 @@ Usually the standard is "Apparent Geocentric"
104
104
  SignsEmoji = Literal["♈️", "♉️", "♊️", "♋️", "♌️", "♍️", "♎️", "♏️", "♐️", "♑️", "♒️", "♓️"]
105
105
 
106
106
 
107
- KerykeionChartTheme = Literal["light", "dark", "dark-high-contrast", "classic"]
107
+ KerykeionChartTheme = Literal["light", "dark", "dark-high-contrast", "classic"]
108
+
109
+
110
+ KerykeionChartLanguage = Literal["EN", "FR", "PT", "IT", "CN", "ES", "RU", "TR", "DE", "HI"]
111
+
112
+ RelationshipScoreDescription = Literal["Minimal", "Medium", "Important", "Very Important", "Exceptional", "Rare Exceptional"]
@@ -21,7 +21,8 @@ from kerykeion.kr_types import (
21
21
  SiderealMode,
22
22
  HousesSystemIdentifier,
23
23
  Houses,
24
- SignsEmoji
24
+ SignsEmoji,
25
+ RelationshipScoreDescription
25
26
  )
26
27
 
27
28
 
@@ -158,6 +159,7 @@ class AspectModel(SubscriptableBaseModel):
158
159
  diff: float
159
160
  p1: int
160
161
  p2: int
162
+ is_major: bool
161
163
 
162
164
 
163
165
  class ZodiacSignModel(SubscriptableBaseModel):
@@ -165,4 +167,19 @@ class ZodiacSignModel(SubscriptableBaseModel):
165
167
  quality: Quality
166
168
  element: Element
167
169
  emoji: SignsEmoji
168
- sign_num: SignNumbers
170
+ sign_num: SignNumbers
171
+
172
+
173
+ class RelationshipScoreAspectModel(SubscriptableBaseModel):
174
+ p1_name: str
175
+ p2_name: str
176
+ aspect: str
177
+ orbit: float
178
+
179
+
180
+ class RelationshipScoreModel(SubscriptableBaseModel):
181
+ score_value: int
182
+ score_description: RelationshipScoreDescription
183
+ is_destiny_sign: bool
184
+ aspects: list[RelationshipScoreAspectModel]
185
+ subjects: list[AstrologicalSubjectModel]
@@ -80,13 +80,9 @@ class KerykeionSettingsAspectModel(SubscriptableBaseModel):
80
80
  name: str = Field(title="Aspect Name", description="The name of the aspect")
81
81
  is_active: bool = Field(title="Aspect is Active", description="Is the aspect active?")
82
82
  is_major: bool = Field(title="Aspect is Major", description="Is the aspect major?")
83
- is_minor: bool = Field(title="Aspect is Minor", description="Is the aspect minor?")
84
83
  orb: int = Field(title="Aspect Orb", description="The orb of the aspect")
85
84
  color: str = Field(title="Aspect Color", description="The color of the aspect")
86
85
 
87
- # Deprecated: Not used anymore
88
- visible_grid: bool = Field(title="Aspect Visible Grid", description="Is the aspect visible in the grid?")
89
-
90
86
 
91
87
  # Language Settings
92
88
  class KerykeionLanguageCelestialPointModel(SubscriptableBaseModel):
@@ -146,14 +142,7 @@ class KerykeionLanguageModel(SubscriptableBaseModel):
146
142
 
147
143
  class KerykeionGeneralSettingsModel(SubscriptableBaseModel):
148
144
  axes_orbit: int = Field(title="Axes Orbit", description="The orbit of the axes in the chart")
149
- language: str = Field(title="Language", description="The language of the chart")
150
-
151
- # Deprecated: Should be removed
152
- planet_in_zodiac_extra_points: int = Field(title="Planet in Zodiac Extra Points", description="The extra points of the planet in the zodiac")
153
145
 
154
- class KerykeionChartSettingsModel(SubscriptableBaseModel):
155
- basic_chart_viewBox: str = Field(title="Basic Chart ViewBox", description="The viewbox of the basic chart")
156
- wide_chart_viewBox: str = Field(title="Wide Chart ViewBox", description="The viewbox of the wide chart")
157
146
 
158
147
  # Settings Model
159
148
  class KerykeionSettingsModel(SubscriptableBaseModel):
@@ -165,5 +154,4 @@ class KerykeionSettingsModel(SubscriptableBaseModel):
165
154
  celestial_points: List[KerykeionSettingsCelestialPointModel] = Field(title="Celestial Points", description="The list of the celestial points of the chart")
166
155
  aspects: List[KerykeionSettingsAspectModel] = Field(title="Aspects", description="The list of the aspects of the chart")
167
156
  language_settings: dict[str, KerykeionLanguageModel] = Field(title="Language Settings", description="The language settings of the chart")
168
- general_settings: KerykeionGeneralSettingsModel = Field(title="General Settings", description="The general settings of the chart")
169
- chart_settings: KerykeionChartSettingsModel = Field(title="Chart Settings", description="The chart settings of the chart")
157
+ general_settings: KerykeionGeneralSettingsModel = Field(title="General Settings", description="The general settings of the chart")
@@ -0,0 +1,2 @@
1
+ from .relationship_score import RelationshipScore
2
+ from .relationship_score_factory import RelationshipScoreFactory