kerykeion 4.18.3__py3-none-any.whl → 5.1.9__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.
- kerykeion/__init__.py +56 -11
- kerykeion/aspects/__init__.py +7 -4
- kerykeion/aspects/aspects_factory.py +568 -0
- kerykeion/aspects/aspects_utils.py +86 -13
- kerykeion/astrological_subject_factory.py +1901 -0
- kerykeion/backword.py +820 -0
- kerykeion/chart_data_factory.py +552 -0
- kerykeion/charts/__init__.py +2 -2
- kerykeion/charts/chart_drawer.py +2794 -0
- kerykeion/charts/charts_utils.py +1066 -309
- kerykeion/charts/draw_planets.py +602 -351
- kerykeion/charts/templates/aspect_grid_only.xml +337 -193
- kerykeion/charts/templates/chart.xml +441 -240
- kerykeion/charts/templates/wheel_only.xml +365 -211
- kerykeion/charts/themes/black-and-white.css +148 -0
- kerykeion/charts/themes/classic.css +107 -76
- kerykeion/charts/themes/dark-high-contrast.css +145 -107
- kerykeion/charts/themes/dark.css +146 -107
- kerykeion/charts/themes/light.css +146 -103
- kerykeion/charts/themes/strawberry.css +158 -0
- kerykeion/composite_subject_factory.py +408 -0
- kerykeion/ephemeris_data_factory.py +443 -0
- kerykeion/fetch_geonames.py +81 -21
- kerykeion/house_comparison/__init__.py +6 -0
- kerykeion/house_comparison/house_comparison_factory.py +103 -0
- kerykeion/house_comparison/house_comparison_utils.py +126 -0
- kerykeion/kr_types/__init__.py +66 -6
- kerykeion/kr_types/chart_template_model.py +20 -0
- kerykeion/kr_types/kerykeion_exception.py +15 -9
- kerykeion/kr_types/kr_literals.py +14 -106
- kerykeion/kr_types/kr_models.py +14 -179
- kerykeion/kr_types/settings_models.py +15 -152
- kerykeion/planetary_return_factory.py +805 -0
- kerykeion/relationship_score_factory.py +301 -0
- kerykeion/report.py +750 -65
- kerykeion/schemas/__init__.py +106 -0
- kerykeion/schemas/chart_template_model.py +367 -0
- kerykeion/schemas/kerykeion_exception.py +20 -0
- kerykeion/schemas/kr_literals.py +181 -0
- kerykeion/schemas/kr_models.py +603 -0
- kerykeion/schemas/settings_models.py +188 -0
- kerykeion/settings/__init__.py +20 -1
- kerykeion/settings/chart_defaults.py +444 -0
- kerykeion/settings/config_constants.py +152 -0
- kerykeion/settings/kerykeion_settings.py +36 -61
- kerykeion/settings/translation_strings.py +1499 -0
- kerykeion/settings/translations.py +74 -0
- kerykeion/sweph/ast136/s136108s.se1 +0 -0
- kerykeion/sweph/ast136/s136199s.se1 +0 -0
- kerykeion/sweph/ast136/s136472s.se1 +0 -0
- kerykeion/sweph/ast28/se28978s.se1 +0 -0
- kerykeion/sweph/ast50/se50000s.se1 +0 -0
- kerykeion/sweph/ast90/se90377s.se1 +0 -0
- kerykeion/sweph/ast90/se90482s.se1 +0 -0
- kerykeion/sweph/sefstars.txt +1602 -0
- kerykeion/transits_time_range_factory.py +302 -0
- kerykeion/utilities.py +626 -125
- kerykeion-5.1.9.dist-info/METADATA +1793 -0
- kerykeion-5.1.9.dist-info/RECORD +63 -0
- {kerykeion-4.18.3.dist-info → kerykeion-5.1.9.dist-info}/WHEEL +1 -1
- kerykeion/aspects/natal_aspects.py +0 -143
- kerykeion/aspects/synastry_aspects.py +0 -113
- kerykeion/astrological_subject.py +0 -818
- kerykeion/charts/kerykeion_chart_svg.py +0 -894
- kerykeion/enums.py +0 -51
- kerykeion/ephemeris_data.py +0 -178
- kerykeion/kr_types/chart_types.py +0 -88
- kerykeion/relationship_score/__init__.py +0 -2
- kerykeion/relationship_score/relationship_score.py +0 -175
- kerykeion/relationship_score/relationship_score_factory.py +0 -275
- kerykeion/settings/kr.config.json +0 -721
- kerykeion-4.18.3.dist-info/LICENSE +0 -661
- kerykeion-4.18.3.dist-info/METADATA +0 -396
- kerykeion-4.18.3.dist-info/RECORD +0 -42
- kerykeion-4.18.3.dist-info/entry_points.txt +0 -3
- /LICENSE → /kerykeion-5.1.9.dist-info/licenses/LICENSE +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"""
|
|
2
|
+
House Comparison Factory Module
|
|
3
|
+
|
|
4
|
+
Provides factory class for house comparison analysis between astrological subjects.
|
|
5
|
+
Enables bidirectional analysis of astrological point placements in house systems.
|
|
6
|
+
|
|
7
|
+
Author: Giacomo Battaglia
|
|
8
|
+
Copyright: (C) 2025 Kerykeion Project
|
|
9
|
+
License: AGPL-3.0
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from kerykeion.house_comparison.house_comparison_utils import calculate_points_in_reciprocal_houses
|
|
13
|
+
from typing import Union
|
|
14
|
+
from kerykeion.settings.config_constants import DEFAULT_ACTIVE_POINTS
|
|
15
|
+
from kerykeion.schemas.kr_models import HouseComparisonModel
|
|
16
|
+
from kerykeion.astrological_subject_factory import AstrologicalSubjectFactory
|
|
17
|
+
from kerykeion.schemas import AstrologicalSubjectModel, PlanetReturnModel
|
|
18
|
+
from kerykeion.schemas.kr_literals import AstrologicalPoint
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class HouseComparisonFactory:
|
|
22
|
+
"""
|
|
23
|
+
Factory for creating house comparison analyses between two astrological subjects.
|
|
24
|
+
|
|
25
|
+
Analyzes placement of astrological points from one subject within the house system
|
|
26
|
+
of another subject, performing bidirectional analysis for synastry studies and
|
|
27
|
+
subject comparisons. Supports both natal subjects and planetary return subjects.
|
|
28
|
+
|
|
29
|
+
Attributes:
|
|
30
|
+
first_subject: First astrological subject (natal or return subject)
|
|
31
|
+
second_subject: Second astrological subject (natal or return subject)
|
|
32
|
+
active_points: List of astrological points to include in analysis
|
|
33
|
+
|
|
34
|
+
Example:
|
|
35
|
+
>>> natal_chart = AstrologicalSubjectFactory.from_birth_data(
|
|
36
|
+
... "Person A", 1990, 5, 15, 10, 30, "Rome", "IT"
|
|
37
|
+
... )
|
|
38
|
+
>>> partner_chart = AstrologicalSubjectFactory.from_birth_data(
|
|
39
|
+
... "Person B", 1992, 8, 23, 14, 45, "Milan", "IT"
|
|
40
|
+
... )
|
|
41
|
+
>>> factory = HouseComparisonFactory(natal_chart, partner_chart)
|
|
42
|
+
>>> comparison = factory.get_house_comparison()
|
|
43
|
+
|
|
44
|
+
"""
|
|
45
|
+
def __init__(self,
|
|
46
|
+
first_subject: Union["AstrologicalSubjectModel", "PlanetReturnModel"],
|
|
47
|
+
second_subject: Union["AstrologicalSubjectModel", "PlanetReturnModel"],
|
|
48
|
+
active_points: list[AstrologicalPoint] = DEFAULT_ACTIVE_POINTS,
|
|
49
|
+
|
|
50
|
+
):
|
|
51
|
+
"""
|
|
52
|
+
Initialize the house comparison factory.
|
|
53
|
+
|
|
54
|
+
Args:
|
|
55
|
+
first_subject: First astrological subject for comparison
|
|
56
|
+
second_subject: Second astrological subject for comparison
|
|
57
|
+
active_points: List of astrological points to include in analysis.
|
|
58
|
+
Defaults to standard active points.
|
|
59
|
+
|
|
60
|
+
Note:
|
|
61
|
+
Both subjects must have valid house system data for accurate analysis.
|
|
62
|
+
"""
|
|
63
|
+
self.first_subject = first_subject
|
|
64
|
+
self.second_subject = second_subject
|
|
65
|
+
self.active_points = active_points
|
|
66
|
+
|
|
67
|
+
def get_house_comparison(self) -> "HouseComparisonModel":
|
|
68
|
+
"""
|
|
69
|
+
Generate bidirectional house comparison analysis between the two subjects.
|
|
70
|
+
|
|
71
|
+
Calculates where each active astrological point from one subject falls within
|
|
72
|
+
the house system of the other subject, and vice versa.
|
|
73
|
+
|
|
74
|
+
Returns:
|
|
75
|
+
HouseComparisonModel: Model containing:
|
|
76
|
+
- first_subject_name: Name of the first subject
|
|
77
|
+
- second_subject_name: Name of the second subject
|
|
78
|
+
- first_points_in_second_houses: First subject's points in second subject's houses
|
|
79
|
+
- second_points_in_first_houses: Second subject's points in first subject's houses
|
|
80
|
+
|
|
81
|
+
Note:
|
|
82
|
+
Analysis scope is determined by the active_points list. Only specified
|
|
83
|
+
points will be included in the results.
|
|
84
|
+
"""
|
|
85
|
+
first_points_in_second_houses = calculate_points_in_reciprocal_houses(self.first_subject, self.second_subject, self.active_points)
|
|
86
|
+
second_points_in_first_houses = calculate_points_in_reciprocal_houses(self.second_subject, self.first_subject, self.active_points)
|
|
87
|
+
|
|
88
|
+
return HouseComparisonModel(
|
|
89
|
+
first_subject_name=self.first_subject.name,
|
|
90
|
+
second_subject_name=self.second_subject.name,
|
|
91
|
+
first_points_in_second_houses=first_points_in_second_houses,
|
|
92
|
+
second_points_in_first_houses=second_points_in_first_houses,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
if __name__ == "__main__":
|
|
97
|
+
natal_chart = AstrologicalSubjectFactory.from_birth_data("Person A", 1990, 5, 15, 10, 30, "Rome", "IT")
|
|
98
|
+
partner_chart = AstrologicalSubjectFactory.from_birth_data("Person B", 1992, 8, 23, 14, 45, "Milan", "IT")
|
|
99
|
+
|
|
100
|
+
factory = HouseComparisonFactory(natal_chart, partner_chart)
|
|
101
|
+
comparison = factory.get_house_comparison()
|
|
102
|
+
|
|
103
|
+
print(comparison.model_dump_json(indent=4))
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"""
|
|
2
|
+
House Comparison Utilities
|
|
3
|
+
|
|
4
|
+
Utility functions for calculating house placement relationships between astrological subjects.
|
|
5
|
+
Provides core calculation logic for determining where points from one subject fall within
|
|
6
|
+
another subject's house system.
|
|
7
|
+
|
|
8
|
+
Author: Giacomo Battaglia
|
|
9
|
+
Copyright: (C) 2025 Kerykeion Project
|
|
10
|
+
License: AGPL-3.0
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from kerykeion.schemas.kr_models import AstrologicalSubjectModel, PlanetReturnModel, PointInHouseModel
|
|
14
|
+
from kerykeion.schemas.kr_literals import AstrologicalPoint
|
|
15
|
+
from kerykeion.settings.config_constants import DEFAULT_ACTIVE_POINTS
|
|
16
|
+
from kerykeion.utilities import get_planet_house, get_house_number
|
|
17
|
+
from typing import Union
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def calculate_points_in_reciprocal_houses(
|
|
21
|
+
point_subject: Union[AstrologicalSubjectModel, PlanetReturnModel],
|
|
22
|
+
house_subject: Union[AstrologicalSubjectModel, PlanetReturnModel],
|
|
23
|
+
active_points: list[AstrologicalPoint] = DEFAULT_ACTIVE_POINTS,
|
|
24
|
+
) -> list[PointInHouseModel]:
|
|
25
|
+
"""
|
|
26
|
+
Calculate house placements of one subject's points within another subject's house system.
|
|
27
|
+
|
|
28
|
+
Analyzes where each astrological point from the point_subject falls within the
|
|
29
|
+
house structure of the house_subject. Creates detailed mapping including both
|
|
30
|
+
the point's original house position and its projected house placement.
|
|
31
|
+
|
|
32
|
+
Args:
|
|
33
|
+
point_subject: Subject whose astrological points are being analyzed
|
|
34
|
+
house_subject: Subject whose house system provides the projection framework
|
|
35
|
+
active_points: List of astrological points to include in the analysis.
|
|
36
|
+
Defaults to standard active points configuration.
|
|
37
|
+
|
|
38
|
+
Returns:
|
|
39
|
+
list[PointInHouseModel]: List of point placement models containing detailed
|
|
40
|
+
information about each point's house relationships,
|
|
41
|
+
including original and projected house positions.
|
|
42
|
+
|
|
43
|
+
Note:
|
|
44
|
+
Only processes points that exist in both the point_subject's active_points
|
|
45
|
+
and the provided active_points list. Points with None values are skipped.
|
|
46
|
+
|
|
47
|
+
Example:
|
|
48
|
+
>>> points_in_houses = calculate_points_in_reciprocal_houses(
|
|
49
|
+
... natal_chart, partner_chart, ["Sun", "Moon"]
|
|
50
|
+
... )
|
|
51
|
+
>>> sun_placement = points_in_houses[0] # Assuming Sun is first
|
|
52
|
+
>>> print(f"Sun falls in house: {sun_placement.projected_house_name}")
|
|
53
|
+
"""
|
|
54
|
+
points_in_houses: list[PointInHouseModel] = []
|
|
55
|
+
|
|
56
|
+
# List of points to consider
|
|
57
|
+
celestial_points = []
|
|
58
|
+
|
|
59
|
+
for point in point_subject.active_points:
|
|
60
|
+
if point not in active_points:
|
|
61
|
+
continue
|
|
62
|
+
|
|
63
|
+
point_obj = getattr(point_subject, point.lower())
|
|
64
|
+
if point_obj is not None:
|
|
65
|
+
celestial_points.append(point_obj)
|
|
66
|
+
|
|
67
|
+
# Ordered list of house cusps degrees for house_subject
|
|
68
|
+
house_cusps = [
|
|
69
|
+
house_subject.first_house.abs_pos,
|
|
70
|
+
house_subject.second_house.abs_pos,
|
|
71
|
+
house_subject.third_house.abs_pos,
|
|
72
|
+
house_subject.fourth_house.abs_pos,
|
|
73
|
+
house_subject.fifth_house.abs_pos,
|
|
74
|
+
house_subject.sixth_house.abs_pos,
|
|
75
|
+
house_subject.seventh_house.abs_pos,
|
|
76
|
+
house_subject.eighth_house.abs_pos,
|
|
77
|
+
house_subject.ninth_house.abs_pos,
|
|
78
|
+
house_subject.tenth_house.abs_pos,
|
|
79
|
+
house_subject.eleventh_house.abs_pos,
|
|
80
|
+
house_subject.twelfth_house.abs_pos,
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
# Ordered list of house cusps degrees for point_subject
|
|
84
|
+
point_subject_house_cusps = [
|
|
85
|
+
point_subject.first_house.abs_pos,
|
|
86
|
+
point_subject.second_house.abs_pos,
|
|
87
|
+
point_subject.third_house.abs_pos,
|
|
88
|
+
point_subject.fourth_house.abs_pos,
|
|
89
|
+
point_subject.fifth_house.abs_pos,
|
|
90
|
+
point_subject.sixth_house.abs_pos,
|
|
91
|
+
point_subject.seventh_house.abs_pos,
|
|
92
|
+
point_subject.eighth_house.abs_pos,
|
|
93
|
+
point_subject.ninth_house.abs_pos,
|
|
94
|
+
point_subject.tenth_house.abs_pos,
|
|
95
|
+
point_subject.eleventh_house.abs_pos,
|
|
96
|
+
point_subject.twelfth_house.abs_pos,
|
|
97
|
+
]
|
|
98
|
+
|
|
99
|
+
# For each point, determine which house it falls in
|
|
100
|
+
for point in celestial_points:
|
|
101
|
+
if point is None:
|
|
102
|
+
continue
|
|
103
|
+
|
|
104
|
+
point_degree = point.abs_pos
|
|
105
|
+
house_name = get_planet_house(point_degree, house_cusps)
|
|
106
|
+
house_number = get_house_number(house_name)
|
|
107
|
+
|
|
108
|
+
# Find which house the point is in its own chart (point_subject)
|
|
109
|
+
point_owner_house_name = get_planet_house(point_degree, point_subject_house_cusps)
|
|
110
|
+
point_owner_house_number = get_house_number(point_owner_house_name)
|
|
111
|
+
|
|
112
|
+
point_in_house = PointInHouseModel(
|
|
113
|
+
point_name=point.name,
|
|
114
|
+
point_degree=point.position,
|
|
115
|
+
point_sign=point.sign,
|
|
116
|
+
point_owner_name=point_subject.name,
|
|
117
|
+
point_owner_house_name=point_owner_house_name,
|
|
118
|
+
point_owner_house_number=point_owner_house_number,
|
|
119
|
+
projected_house_number=house_number,
|
|
120
|
+
projected_house_name=house_name,
|
|
121
|
+
projected_house_owner_name=house_subject.name,
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
points_in_houses.append(point_in_house)
|
|
125
|
+
|
|
126
|
+
return points_in_houses
|
kerykeion/kr_types/__init__.py
CHANGED
|
@@ -1,10 +1,70 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
|
|
3
|
+
Backward compatibility module for Kerykeion v4.x imports.
|
|
4
|
+
|
|
5
|
+
DEPRECATED: This module will be removed in Kerykeion v6.0.
|
|
6
|
+
Please update your imports:
|
|
7
|
+
OLD: from kerykeion.kr_types import ...
|
|
8
|
+
NEW: from kerykeion.schemas import ...
|
|
4
9
|
"""
|
|
10
|
+
import warnings
|
|
11
|
+
|
|
12
|
+
# Issue deprecation warning when this module is imported
|
|
13
|
+
warnings.warn(
|
|
14
|
+
"The 'kerykeion.kr_types' module is deprecated and will be removed in v6.0. "
|
|
15
|
+
"Please update your imports to use 'kerykeion.schemas' instead.",
|
|
16
|
+
DeprecationWarning,
|
|
17
|
+
stacklevel=2,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
# Re-export everything from schemas for backward compatibility
|
|
21
|
+
from kerykeion.schemas import * # noqa: F401, F403
|
|
22
|
+
from kerykeion.schemas.kerykeion_exception import * # noqa: F401, F403
|
|
23
|
+
from kerykeion.schemas.kr_literals import * # noqa: F401, F403
|
|
24
|
+
from kerykeion.schemas.kr_models import * # noqa: F401, F403
|
|
25
|
+
from kerykeion.schemas.settings_models import * # noqa: F401, F403
|
|
26
|
+
from kerykeion.schemas.chart_template_model import * # noqa: F401, F403
|
|
5
27
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
28
|
+
__all__ = [
|
|
29
|
+
# Re-export from schemas
|
|
30
|
+
"KerykeionException",
|
|
31
|
+
# kr_literals
|
|
32
|
+
"ZodiacType",
|
|
33
|
+
"Sign",
|
|
34
|
+
"SignNumbers",
|
|
35
|
+
"AspectMovementType",
|
|
36
|
+
"Houses",
|
|
37
|
+
"HouseNumbers",
|
|
38
|
+
"AstrologicalPoint",
|
|
39
|
+
"Element",
|
|
40
|
+
"Quality",
|
|
41
|
+
"ChartType",
|
|
42
|
+
"PointType",
|
|
43
|
+
"LunarPhaseEmoji",
|
|
44
|
+
"LunarPhaseName",
|
|
45
|
+
"SiderealMode",
|
|
46
|
+
"HousesSystemIdentifier",
|
|
47
|
+
"PerspectiveType",
|
|
48
|
+
"SignsEmoji",
|
|
49
|
+
"KerykeionChartTheme",
|
|
50
|
+
"KerykeionChartLanguage",
|
|
51
|
+
"RelationshipScoreDescription",
|
|
52
|
+
"CompositeChartType",
|
|
53
|
+
"AspectName",
|
|
54
|
+
# kr_models
|
|
55
|
+
"AstrologicalSubjectModel",
|
|
56
|
+
"CompositeSubjectModel",
|
|
57
|
+
"KerykeionPointModel",
|
|
58
|
+
"AspectModel",
|
|
59
|
+
"ActiveAspect",
|
|
60
|
+
"SingleChartAspectsModel",
|
|
61
|
+
"DualChartAspectsModel",
|
|
62
|
+
"ElementDistributionModel",
|
|
63
|
+
"QualityDistributionModel",
|
|
64
|
+
"SingleChartDataModel",
|
|
65
|
+
"DualChartDataModel",
|
|
66
|
+
# settings_models
|
|
67
|
+
"KerykeionSettingsModel",
|
|
68
|
+
# chart_template_model
|
|
69
|
+
"ChartTemplateModel",
|
|
70
|
+
]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
Backward compatibility module for chart_template_model.
|
|
4
|
+
|
|
5
|
+
DEPRECATED: This module will be removed in Kerykeion v6.0.
|
|
6
|
+
Please update your imports:
|
|
7
|
+
OLD: from kerykeion.kr_types.chart_template_model import ...
|
|
8
|
+
NEW: from kerykeion.schemas.chart_template_model import ...
|
|
9
|
+
"""
|
|
10
|
+
import warnings
|
|
11
|
+
|
|
12
|
+
warnings.warn(
|
|
13
|
+
"The 'kerykeion.kr_types.chart_template_model' module is deprecated and will be removed in v6.0. "
|
|
14
|
+
"Please update your imports to use 'kerykeion.schemas.chart_template_model' instead.",
|
|
15
|
+
DeprecationWarning,
|
|
16
|
+
stacklevel=2,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
# Re-export everything from schemas.chart_template_model for backward compatibility
|
|
20
|
+
from kerykeion.schemas.chart_template_model import * # noqa: F401, F403
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
|
|
4
|
-
"""
|
|
3
|
+
Backward compatibility module for kerykeion_exception.
|
|
5
4
|
|
|
5
|
+
DEPRECATED: This module will be removed in Kerykeion v6.0.
|
|
6
|
+
Please update your imports:
|
|
7
|
+
OLD: from kerykeion.kr_types.kerykeion_exception import ...
|
|
8
|
+
NEW: from kerykeion.schemas.kerykeion_exception import ...
|
|
9
|
+
"""
|
|
10
|
+
import warnings
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
""
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
warnings.warn(
|
|
13
|
+
"The 'kerykeion.kr_types.kerykeion_exception' module is deprecated and will be removed in v6.0. "
|
|
14
|
+
"Please update your imports to use 'kerykeion.schemas.kerykeion_exception' instead.",
|
|
15
|
+
DeprecationWarning,
|
|
16
|
+
stacklevel=2,
|
|
17
|
+
)
|
|
11
18
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
super().__init__(message)
|
|
19
|
+
# Re-export everything from schemas.kerykeion_exception for backward compatibility
|
|
20
|
+
from kerykeion.schemas.kerykeion_exception import * # noqa: F401, F403
|
|
@@ -1,112 +1,20 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
|
|
4
|
-
"""
|
|
5
|
-
from typing import Literal
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ZodiacType = Literal["Tropic", "Sidereal"]
|
|
9
|
-
"""Literal type for Zodiac Types"""
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Sign = Literal["Ari", "Tau", "Gem", "Can", "Leo", "Vir", "Lib", "Sco", "Sag", "Cap", "Aqu", "Pis"]
|
|
13
|
-
"""Literal type for Zodiac Signs"""
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
SignNumbers = Literal[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
|
17
|
-
"""Literal type for Zodiac Sign Numbers, the signs are numbered in order starting from Aries (0) to Pis (11)"""
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
Houses = Literal["First_House", "Second_House", "Third_House", "Fourth_House", "Fifth_House", "Sixth_House", "Seventh_House", "Eighth_House", "Ninth_House", "Tenth_House", "Eleventh_House", "Twelfth_House"]
|
|
21
|
-
"""Literal type for Houses"""
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
HouseNumbers = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
25
|
-
"""Literal type for House Numbers, starting from the First House (1) to the Twelfth House (12)"""
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
Planet = Literal["Sun", "Moon", "Mercury", "Venus", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto", "Mean_Node", "True_Node", "Chiron", "Mean_Lilith"]
|
|
29
|
-
"""Literal type for Planets"""
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
Element = Literal["Air", "Fire", "Earth", "Water"]
|
|
33
|
-
"""Literal type for Elements"""
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Quality = Literal["Cardinal", "Fixed", "Mutable"]
|
|
37
|
-
"""Literal type for Qualities"""
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
ChartType = Literal["Natal", "ExternalNatal", "Synastry", "Transit"]
|
|
41
|
-
"""Literal type for Chart Types"""
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
PointType = Literal["Planet", "House"]
|
|
45
|
-
"""Literal type for Point Types"""
|
|
3
|
+
Backward compatibility module for kr_literals.
|
|
46
4
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
LunarPhaseName = Literal["New Moon", "Waxing Crescent", "First Quarter", "Waxing Gibbous", "Full Moon", "Waning Gibbous", "Last Quarter", "Waning Crescent"]
|
|
53
|
-
"""Literal type for Lunar Phases Name"""
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
SiderealMode = Literal["FAGAN_BRADLEY", "LAHIRI", "DELUCE", "RAMAN", "USHASHASHI", "KRISHNAMURTI", "DJWHAL_KHUL", "YUKTESHWAR", "JN_BHASIN", "BABYL_KUGLER1", "BABYL_KUGLER2", "BABYL_KUGLER3", "BABYL_HUBER", "BABYL_ETPSC", "ALDEBARAN_15TAU", "HIPPARCHOS", "SASSANIAN", "J2000", "J1900", "B1950"]
|
|
57
|
-
"""Literal type for Sidereal Modes, as known as Ayanamsa"""
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
HousesSystemIdentifier = Literal["A", "B", "C", "D", "F", "H", "I", "i", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y"]
|
|
61
|
-
"""
|
|
62
|
-
Literal type for Houses Systems:
|
|
63
|
-
|
|
64
|
-
A = equal
|
|
65
|
-
B = Alcabitius
|
|
66
|
-
C = Campanus
|
|
67
|
-
D = equal (MC)
|
|
68
|
-
F = Carter poli-equ.
|
|
69
|
-
H = horizon/azimut
|
|
70
|
-
I = Sunshine
|
|
71
|
-
i = Sunshine/alt.
|
|
72
|
-
K = Koch
|
|
73
|
-
L = Pullen SD
|
|
74
|
-
M = Morinus
|
|
75
|
-
N = equal/1=Aries
|
|
76
|
-
O = Porphyry
|
|
77
|
-
P = Placidus
|
|
78
|
-
Q = Pullen SR
|
|
79
|
-
R = Regiomontanus
|
|
80
|
-
S = Sripati
|
|
81
|
-
T = Polich/Page
|
|
82
|
-
U = Krusinski-Pisa-Goelzer
|
|
83
|
-
V = equal/Vehlow
|
|
84
|
-
W = equal/whole sign
|
|
85
|
-
X = axial rotation system/Meridian houses
|
|
86
|
-
Y = APC houses
|
|
87
|
-
|
|
88
|
-
Usually the standard is Placidus (P)
|
|
5
|
+
DEPRECATED: This module will be removed in Kerykeion v6.0.
|
|
6
|
+
Please update your imports:
|
|
7
|
+
OLD: from kerykeion.kr_types.kr_literals import ...
|
|
8
|
+
NEW: from kerykeion.schemas.kr_literals import ...
|
|
89
9
|
"""
|
|
10
|
+
import warnings
|
|
90
11
|
|
|
12
|
+
warnings.warn(
|
|
13
|
+
"The 'kerykeion.kr_types.kr_literals' module is deprecated and will be removed in v6.0. "
|
|
14
|
+
"Please update your imports to use 'kerykeion.schemas.kr_literals' instead.",
|
|
15
|
+
DeprecationWarning,
|
|
16
|
+
stacklevel=2,
|
|
17
|
+
)
|
|
91
18
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Literal type for perspective types.
|
|
95
|
-
- "Apparent Geocentric": Earth-centered, apparent positions.
|
|
96
|
-
- "Heliocentric": Sun-centered.
|
|
97
|
-
- "Topocentric": Observer's location on Earth's surface.
|
|
98
|
-
- "True Geocentric": Earth-centered, true positions.
|
|
99
|
-
|
|
100
|
-
Usually the standard is "Apparent Geocentric"
|
|
101
|
-
"""
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
SignsEmoji = Literal["♈️", "♉️", "♊️", "♋️", "♌️", "♍️", "♎️", "♏️", "♐️", "♑️", "♒️", "♓️"]
|
|
105
|
-
|
|
106
|
-
|
|
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"]
|
|
19
|
+
# Re-export everything from schemas.kr_literals for backward compatibility
|
|
20
|
+
from kerykeion.schemas.kr_literals import * # noqa: F401, F403
|
kerykeion/kr_types/kr_models.py
CHANGED
|
@@ -1,185 +1,20 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
|
|
4
|
-
"""
|
|
5
|
-
|
|
3
|
+
Backward compatibility module for kr_models.
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
DEPRECATED: This module will be removed in Kerykeion v6.0.
|
|
6
|
+
Please update your imports:
|
|
7
|
+
OLD: from kerykeion.kr_types.kr_models import ...
|
|
8
|
+
NEW: from kerykeion.schemas.kr_models import ...
|
|
9
|
+
"""
|
|
10
|
+
import warnings
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Quality,
|
|
16
|
-
Element,
|
|
17
|
-
Sign,
|
|
18
|
-
ZodiacType,
|
|
19
|
-
SignNumbers,
|
|
20
|
-
PointType,
|
|
21
|
-
SiderealMode,
|
|
22
|
-
HousesSystemIdentifier,
|
|
23
|
-
Houses,
|
|
24
|
-
SignsEmoji,
|
|
25
|
-
RelationshipScoreDescription
|
|
12
|
+
warnings.warn(
|
|
13
|
+
"The 'kerykeion.kr_types.kr_models' module is deprecated and will be removed in v6.0. "
|
|
14
|
+
"Please update your imports to use 'kerykeion.schemas.kr_models' instead.",
|
|
15
|
+
DeprecationWarning,
|
|
16
|
+
stacklevel=2,
|
|
26
17
|
)
|
|
27
18
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"""
|
|
31
|
-
Pydantic BaseModel with subscriptable support, so you can access the fields as if they were a dictionary.
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
def __getitem__(self, key):
|
|
35
|
-
return getattr(self, key)
|
|
36
|
-
|
|
37
|
-
def __setitem__(self, key, value):
|
|
38
|
-
setattr(self, key, value)
|
|
39
|
-
|
|
40
|
-
def __delitem__(self, key):
|
|
41
|
-
delattr(self, key)
|
|
42
|
-
|
|
43
|
-
def get(self, key, default = None):
|
|
44
|
-
return getattr(self, key, default)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
class LunarPhaseModel(SubscriptableBaseModel):
|
|
48
|
-
degrees_between_s_m: Union[float, int]
|
|
49
|
-
moon_phase: int
|
|
50
|
-
sun_phase: int
|
|
51
|
-
moon_emoji: LunarPhaseEmoji
|
|
52
|
-
moon_phase_name: LunarPhaseName
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
class KerykeionPointModel(SubscriptableBaseModel):
|
|
56
|
-
"""
|
|
57
|
-
Kerykeion Point Model
|
|
58
|
-
"""
|
|
59
|
-
|
|
60
|
-
name: Union[Planet, Houses]
|
|
61
|
-
quality: Quality
|
|
62
|
-
element: Element
|
|
63
|
-
sign: Sign
|
|
64
|
-
sign_num: SignNumbers
|
|
65
|
-
position: float
|
|
66
|
-
abs_pos: float
|
|
67
|
-
emoji: str
|
|
68
|
-
point_type: PointType
|
|
69
|
-
house: Optional[Houses] = None
|
|
70
|
-
retrograde: Optional[bool] = None
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
class AstrologicalSubjectModel(SubscriptableBaseModel):
|
|
74
|
-
# Data
|
|
75
|
-
name: str
|
|
76
|
-
year: int
|
|
77
|
-
month: int
|
|
78
|
-
day: int
|
|
79
|
-
hour: int
|
|
80
|
-
minute: int
|
|
81
|
-
city: str
|
|
82
|
-
nation: str
|
|
83
|
-
lng: float
|
|
84
|
-
lat: float
|
|
85
|
-
tz_str: str
|
|
86
|
-
zodiac_type: ZodiacType
|
|
87
|
-
sidereal_mode: Union[SiderealMode, None]
|
|
88
|
-
houses_system_identifier: HousesSystemIdentifier
|
|
89
|
-
houses_system_name: str
|
|
90
|
-
perspective_type: str
|
|
91
|
-
iso_formatted_local_datetime: str
|
|
92
|
-
iso_formatted_utc_datetime: str
|
|
93
|
-
julian_day: float
|
|
94
|
-
|
|
95
|
-
# Deprecated properties -->
|
|
96
|
-
utc_time: float
|
|
97
|
-
local_time: float
|
|
98
|
-
# <-- Deprecated properties
|
|
99
|
-
|
|
100
|
-
# Planets
|
|
101
|
-
sun: KerykeionPointModel
|
|
102
|
-
moon: KerykeionPointModel
|
|
103
|
-
mercury: KerykeionPointModel
|
|
104
|
-
venus: KerykeionPointModel
|
|
105
|
-
mars: KerykeionPointModel
|
|
106
|
-
jupiter: KerykeionPointModel
|
|
107
|
-
saturn: KerykeionPointModel
|
|
108
|
-
uranus: KerykeionPointModel
|
|
109
|
-
neptune: KerykeionPointModel
|
|
110
|
-
pluto: KerykeionPointModel
|
|
111
|
-
|
|
112
|
-
# Optional Planets:
|
|
113
|
-
chiron: Union[KerykeionPointModel, None]
|
|
114
|
-
mean_lilith: Union[KerykeionPointModel, None]
|
|
115
|
-
|
|
116
|
-
# Houses
|
|
117
|
-
first_house: KerykeionPointModel
|
|
118
|
-
second_house: KerykeionPointModel
|
|
119
|
-
third_house: KerykeionPointModel
|
|
120
|
-
fourth_house: KerykeionPointModel
|
|
121
|
-
fifth_house: KerykeionPointModel
|
|
122
|
-
sixth_house: KerykeionPointModel
|
|
123
|
-
seventh_house: KerykeionPointModel
|
|
124
|
-
eighth_house: KerykeionPointModel
|
|
125
|
-
ninth_house: KerykeionPointModel
|
|
126
|
-
tenth_house: KerykeionPointModel
|
|
127
|
-
eleventh_house: KerykeionPointModel
|
|
128
|
-
twelfth_house: KerykeionPointModel
|
|
129
|
-
|
|
130
|
-
# Nodes
|
|
131
|
-
mean_node: KerykeionPointModel
|
|
132
|
-
true_node: KerykeionPointModel
|
|
133
|
-
|
|
134
|
-
lunar_phase: LunarPhaseModel
|
|
135
|
-
"""Lunar phase model"""
|
|
136
|
-
|
|
137
|
-
planets_names_list: list[Planet]
|
|
138
|
-
"""Ordered list of available planets names"""
|
|
139
|
-
|
|
140
|
-
houses_names_list: list[Houses]
|
|
141
|
-
"""Ordered list of houses names"""
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
class EphemerisDictModel(SubscriptableBaseModel):
|
|
145
|
-
date: str
|
|
146
|
-
planets: list[KerykeionPointModel]
|
|
147
|
-
houses: list[KerykeionPointModel]
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
class AspectModel(SubscriptableBaseModel):
|
|
151
|
-
p1_name: str
|
|
152
|
-
p1_abs_pos: float
|
|
153
|
-
p2_name: str
|
|
154
|
-
p2_abs_pos: float
|
|
155
|
-
aspect: str
|
|
156
|
-
orbit: float
|
|
157
|
-
aspect_degrees: int
|
|
158
|
-
aid: int
|
|
159
|
-
diff: float
|
|
160
|
-
p1: int
|
|
161
|
-
p2: int
|
|
162
|
-
is_major: bool
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
class ZodiacSignModel(SubscriptableBaseModel):
|
|
166
|
-
sign: Sign
|
|
167
|
-
quality: Quality
|
|
168
|
-
element: Element
|
|
169
|
-
emoji: SignsEmoji
|
|
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]
|
|
19
|
+
# Re-export everything from schemas.kr_models for backward compatibility
|
|
20
|
+
from kerykeion.schemas.kr_models import * # noqa: F401, F403
|