kerykeion 5.0.0a10__py3-none-any.whl → 5.0.0a12__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 +4 -9
- kerykeion/aspects/__init__.py +2 -4
- kerykeion/aspects/aspects_factory.py +514 -0
- kerykeion/astrological_subject_factory.py +685 -79
- kerykeion/charts/draw_planets.py +584 -343
- kerykeion/charts/kerykeion_chart_svg.py +10 -16
- kerykeion/charts/templates/wheel_only.xml +1 -1
- kerykeion/composite_subject_factory.py +228 -9
- kerykeion/ephemeris_data_factory.py +431 -0
- kerykeion/fetch_geonames.py +27 -8
- kerykeion/house_comparison/house_comparison_factory.py +48 -15
- kerykeion/house_comparison/house_comparison_models.py +51 -13
- kerykeion/house_comparison/house_comparison_utils.py +35 -5
- kerykeion/kr_types/kerykeion_exception.py +6 -0
- kerykeion/kr_types/kr_models.py +82 -12
- kerykeion/planetary_return_factory.py +532 -32
- kerykeion/relationship_score_factory.py +98 -44
- kerykeion/report.py +7 -0
- kerykeion/sweph/sefstars.txt +1602 -0
- kerykeion/transits_time_range_factory.py +293 -0
- kerykeion/utilities.py +129 -67
- {kerykeion-5.0.0a10.dist-info → kerykeion-5.0.0a12.dist-info}/METADATA +49 -22
- kerykeion-5.0.0a12.dist-info/RECORD +50 -0
- kerykeion/aspects/natal_aspects_factory.py +0 -236
- kerykeion/aspects/synastry_aspects_factory.py +0 -234
- kerykeion/charts/draw_planets_v2.py +0 -648
- kerykeion/charts/draw_planets_v3.py +0 -679
- kerykeion/enums.py +0 -57
- kerykeion/ephemeris_data.py +0 -238
- kerykeion/transits_time_range.py +0 -128
- kerykeion-5.0.0a10.dist-info/RECORD +0 -53
- {kerykeion-5.0.0a10.dist-info → kerykeion-5.0.0a12.dist-info}/WHEEL +0 -0
- {kerykeion-5.0.0a10.dist-info → kerykeion-5.0.0a12.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,38 +1,76 @@
|
|
|
1
|
+
"""
|
|
2
|
+
House Comparison Data Models
|
|
3
|
+
|
|
4
|
+
Pydantic models for house comparison analysis results between astrological subjects.
|
|
5
|
+
Structures data output from house comparison calculations.
|
|
6
|
+
|
|
7
|
+
Author: Giacomo Battaglia
|
|
8
|
+
Copyright: (C) 2025 Kerykeion Project
|
|
9
|
+
License: AGPL-3.0
|
|
10
|
+
"""
|
|
11
|
+
|
|
1
12
|
from kerykeion.kr_types import SubscriptableBaseModel
|
|
2
13
|
from typing import Optional
|
|
3
14
|
|
|
4
15
|
|
|
5
16
|
class PointInHouseModel(SubscriptableBaseModel):
|
|
6
|
-
"""
|
|
17
|
+
"""
|
|
18
|
+
Represents an astrological point from one subject positioned within another subject's house.
|
|
19
|
+
|
|
20
|
+
Captures point characteristics and its placement within the target subject's house system
|
|
21
|
+
for house comparison analysis.
|
|
22
|
+
|
|
23
|
+
Attributes:
|
|
24
|
+
point_name: Name of the astrological point
|
|
25
|
+
point_degree: Degree position within its sign
|
|
26
|
+
point_sign: Zodiacal sign containing the point
|
|
27
|
+
point_owner_name: Name of the subject who owns this point
|
|
28
|
+
point_owner_house_number: House number in owner's chart
|
|
29
|
+
point_owner_house_name: House name in owner's chart
|
|
30
|
+
projected_house_number: House number in target subject's chart
|
|
31
|
+
projected_house_name: House name in target subject's chart
|
|
32
|
+
projected_house_owner_name: Name of the target subject
|
|
33
|
+
"""
|
|
7
34
|
|
|
8
35
|
point_name: str
|
|
9
|
-
"""Name of the
|
|
36
|
+
"""Name of the astrological point"""
|
|
10
37
|
point_degree: float
|
|
11
|
-
"""Degree of the
|
|
38
|
+
"""Degree position of the point within its zodiacal sign"""
|
|
12
39
|
point_sign: str
|
|
13
|
-
"""
|
|
40
|
+
"""Zodiacal sign containing the point"""
|
|
14
41
|
point_owner_name: str
|
|
15
|
-
"""Name of the
|
|
42
|
+
"""Name of the subject who owns this point"""
|
|
16
43
|
point_owner_house_number: Optional[int]
|
|
17
|
-
"""House number
|
|
44
|
+
"""House number in owner's chart"""
|
|
18
45
|
point_owner_house_name: Optional[str]
|
|
19
|
-
"""House name
|
|
46
|
+
"""House name in owner's chart"""
|
|
20
47
|
projected_house_number: int
|
|
21
|
-
"""
|
|
48
|
+
"""House number in target subject's chart"""
|
|
22
49
|
projected_house_name: str
|
|
23
|
-
"""
|
|
50
|
+
"""House name in target subject's chart"""
|
|
24
51
|
projected_house_owner_name: str
|
|
25
|
-
"""Name of the
|
|
52
|
+
"""Name of the target subject"""
|
|
26
53
|
|
|
27
54
|
|
|
28
55
|
class HouseComparisonModel(SubscriptableBaseModel):
|
|
29
|
-
"""
|
|
56
|
+
"""
|
|
57
|
+
Bidirectional house comparison analysis between two astrological subjects.
|
|
58
|
+
|
|
59
|
+
Contains results of how astrological points from each subject interact with
|
|
60
|
+
the house system of the other subject.
|
|
61
|
+
|
|
62
|
+
Attributes:
|
|
63
|
+
first_subject_name: Name of the first subject
|
|
64
|
+
second_subject_name: Name of the second subject
|
|
65
|
+
first_points_in_second_houses: First subject's points in second subject's houses
|
|
66
|
+
second_points_in_first_houses: Second subject's points in first subject's houses
|
|
67
|
+
"""
|
|
30
68
|
|
|
31
69
|
first_subject_name: str
|
|
32
70
|
"""Name of the first subject"""
|
|
33
71
|
second_subject_name: str
|
|
34
72
|
"""Name of the second subject"""
|
|
35
73
|
first_points_in_second_houses: list[PointInHouseModel]
|
|
36
|
-
"""
|
|
74
|
+
"""First subject's points positioned in second subject's houses"""
|
|
37
75
|
second_points_in_first_houses: list[PointInHouseModel]
|
|
38
|
-
"""
|
|
76
|
+
"""Second subject's points positioned in first subject's houses"""
|
|
@@ -1,3 +1,15 @@
|
|
|
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
|
+
|
|
1
13
|
from kerykeion.kr_types.kr_models import AstrologicalSubjectModel, PlanetReturnModel
|
|
2
14
|
from kerykeion.kr_types.kr_literals import AstrologicalPoint
|
|
3
15
|
from kerykeion.settings.config_constants import DEFAULT_ACTIVE_POINTS
|
|
@@ -12,15 +24,33 @@ def calculate_points_in_reciprocal_houses(
|
|
|
12
24
|
active_points: list[AstrologicalPoint] = DEFAULT_ACTIVE_POINTS,
|
|
13
25
|
) -> list[PointInHouseModel]:
|
|
14
26
|
"""
|
|
15
|
-
|
|
27
|
+
Calculate house placements of one subject's points within another subject's house system.
|
|
28
|
+
|
|
29
|
+
Analyzes where each astrological point from the point_subject falls within the
|
|
30
|
+
house structure of the house_subject. Creates detailed mapping including both
|
|
31
|
+
the point's original house position and its projected house placement.
|
|
16
32
|
|
|
17
33
|
Args:
|
|
18
|
-
point_subject: Subject whose points are being analyzed
|
|
19
|
-
house_subject: Subject whose
|
|
20
|
-
active_points:
|
|
34
|
+
point_subject: Subject whose astrological points are being analyzed
|
|
35
|
+
house_subject: Subject whose house system provides the projection framework
|
|
36
|
+
active_points: List of astrological points to include in the analysis.
|
|
37
|
+
Defaults to standard active points configuration.
|
|
21
38
|
|
|
22
39
|
Returns:
|
|
23
|
-
List of
|
|
40
|
+
list[PointInHouseModel]: List of point placement models containing detailed
|
|
41
|
+
information about each point's house relationships,
|
|
42
|
+
including original and projected house positions.
|
|
43
|
+
|
|
44
|
+
Note:
|
|
45
|
+
Only processes points that exist in both the point_subject's active_points
|
|
46
|
+
and the provided active_points list. Points with None values are skipped.
|
|
47
|
+
|
|
48
|
+
Example:
|
|
49
|
+
>>> points_in_houses = calculate_points_in_reciprocal_houses(
|
|
50
|
+
... natal_chart, partner_chart, [AstrologicalPoint.SUN, AstrologicalPoint.MOON]
|
|
51
|
+
... )
|
|
52
|
+
>>> sun_placement = points_in_houses[0] # Assuming Sun is first
|
|
53
|
+
>>> print(f"Sun falls in house: {sun_placement.projected_house_name}")
|
|
24
54
|
"""
|
|
25
55
|
points_in_houses: list[PointInHouseModel] = []
|
|
26
56
|
|
|
@@ -10,5 +10,11 @@ class KerykeionException(Exception):
|
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
12
|
def __init__(self, message):
|
|
13
|
+
"""
|
|
14
|
+
Initialize a new KerykeionException.
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
message: The error message to be displayed.
|
|
18
|
+
"""
|
|
13
19
|
# Call the base class constructor with the parameters it needs
|
|
14
20
|
super().__init__(message)
|
kerykeion/kr_types/kr_models.py
CHANGED
|
@@ -34,19 +34,33 @@ class SubscriptableBaseModel(BaseModel):
|
|
|
34
34
|
"""
|
|
35
35
|
|
|
36
36
|
def __getitem__(self, key):
|
|
37
|
+
"""Get an attribute using dictionary-style access."""
|
|
37
38
|
return getattr(self, key)
|
|
38
39
|
|
|
39
40
|
def __setitem__(self, key, value):
|
|
41
|
+
"""Set an attribute using dictionary-style access."""
|
|
40
42
|
setattr(self, key, value)
|
|
41
43
|
|
|
42
44
|
def __delitem__(self, key):
|
|
45
|
+
"""Delete an attribute using dictionary-style access."""
|
|
43
46
|
delattr(self, key)
|
|
44
47
|
|
|
45
48
|
def get(self, key, default = None):
|
|
49
|
+
"""Get an attribute with a default value if not found."""
|
|
46
50
|
return getattr(self, key, default)
|
|
47
51
|
|
|
48
52
|
|
|
49
53
|
class LunarPhaseModel(SubscriptableBaseModel):
|
|
54
|
+
"""
|
|
55
|
+
Model representing lunar phase information.
|
|
56
|
+
|
|
57
|
+
Attributes:
|
|
58
|
+
degrees_between_s_m: Angular separation between Sun and Moon in degrees.
|
|
59
|
+
moon_phase: Numerical phase identifier for the Moon.
|
|
60
|
+
sun_phase: Numerical phase identifier for the Sun.
|
|
61
|
+
moon_emoji: Emoji representation of the lunar phase.
|
|
62
|
+
moon_phase_name: Text name of the lunar phase.
|
|
63
|
+
"""
|
|
50
64
|
degrees_between_s_m: Union[float, int]
|
|
51
65
|
moon_phase: int
|
|
52
66
|
sun_phase: int
|
|
@@ -56,7 +70,24 @@ class LunarPhaseModel(SubscriptableBaseModel):
|
|
|
56
70
|
|
|
57
71
|
class KerykeionPointModel(SubscriptableBaseModel):
|
|
58
72
|
"""
|
|
59
|
-
|
|
73
|
+
Model representing an astrological celestial point or house cusp.
|
|
74
|
+
|
|
75
|
+
This model contains comprehensive information about celestial objects
|
|
76
|
+
(planets, points) or house cusps including their zodiacal position,
|
|
77
|
+
sign placement, and metadata.
|
|
78
|
+
|
|
79
|
+
Attributes:
|
|
80
|
+
name: The name of the celestial point or house.
|
|
81
|
+
quality: Astrological quality (Cardinal, Fixed, Mutable).
|
|
82
|
+
element: Astrological element (Fire, Earth, Air, Water).
|
|
83
|
+
sign: The zodiac sign the point is located in.
|
|
84
|
+
sign_num: Numerical identifier for the zodiac sign (0-11).
|
|
85
|
+
position: Position within the sign (0-30 degrees).
|
|
86
|
+
abs_pos: Absolute position in the zodiac (0-360 degrees).
|
|
87
|
+
emoji: Unicode emoji representing the point or sign.
|
|
88
|
+
point_type: Type of the celestial point (Planet, House, etc.).
|
|
89
|
+
house: House placement of the point (optional).
|
|
90
|
+
retrograde: Whether the point is in retrograde motion (optional).
|
|
60
91
|
"""
|
|
61
92
|
|
|
62
93
|
name: Union[AstrologicalPoint, Houses]
|
|
@@ -74,7 +105,29 @@ class KerykeionPointModel(SubscriptableBaseModel):
|
|
|
74
105
|
|
|
75
106
|
class AstrologicalBaseModel(SubscriptableBaseModel):
|
|
76
107
|
"""
|
|
77
|
-
Base
|
|
108
|
+
Base model containing common fields for all astrological subjects.
|
|
109
|
+
|
|
110
|
+
This model serves as the foundation for all astrological chart types,
|
|
111
|
+
providing standard location, time, and configuration data. It supports
|
|
112
|
+
both complete charts (with full location/time data) and composite charts
|
|
113
|
+
(where some fields may be optional).
|
|
114
|
+
|
|
115
|
+
Attributes:
|
|
116
|
+
name: Subject identifier or name.
|
|
117
|
+
city: Location city (optional for composite charts).
|
|
118
|
+
nation: Country code (optional for composite charts).
|
|
119
|
+
lng: Longitude coordinate (optional for composite charts).
|
|
120
|
+
lat: Latitude coordinate (optional for composite charts).
|
|
121
|
+
tz_str: Timezone string (optional for composite charts).
|
|
122
|
+
iso_formatted_local_datetime: Local datetime in ISO format (optional).
|
|
123
|
+
iso_formatted_utc_datetime: UTC datetime in ISO format (optional).
|
|
124
|
+
julian_day: Julian day number for astronomical calculations (optional).
|
|
125
|
+
day_of_week: Day of the week (optional).
|
|
126
|
+
zodiac_type: Type of zodiac system used (Tropical or Sidereal).
|
|
127
|
+
sidereal_mode: Sidereal calculation mode (if applicable).
|
|
128
|
+
houses_system_identifier: House system used for calculations.
|
|
129
|
+
perspective_type: Astrological perspective (geocentric, heliocentric, etc.).
|
|
130
|
+
active_points: List of celestial points included in calculations.
|
|
78
131
|
"""
|
|
79
132
|
# Common identification data
|
|
80
133
|
name: str
|
|
@@ -285,35 +338,52 @@ class TransitMomentModel(SubscriptableBaseModel):
|
|
|
285
338
|
aspects: List[AspectModel] = Field(description="List of aspects active at this specific moment.")
|
|
286
339
|
|
|
287
340
|
|
|
288
|
-
class
|
|
341
|
+
class SingleChartAspectsModel(SubscriptableBaseModel):
|
|
289
342
|
"""
|
|
290
|
-
Model representing all aspects
|
|
343
|
+
Model representing all aspects within a single astrological chart.
|
|
344
|
+
|
|
345
|
+
This model can be used for any type of single chart analysis including:
|
|
346
|
+
- Natal charts
|
|
347
|
+
- Planetary return charts
|
|
348
|
+
- Composite charts
|
|
349
|
+
- Any other single chart type
|
|
291
350
|
|
|
292
351
|
Contains both all calculated aspects and the filtered relevant aspects
|
|
293
|
-
for
|
|
352
|
+
for the astrological subject.
|
|
294
353
|
"""
|
|
295
354
|
subject: Union["AstrologicalSubjectModel", "CompositeSubjectModel", "PlanetReturnModel"] = Field(description="The astrological subject for which aspects were calculated.")
|
|
296
|
-
all_aspects: List[AspectModel] = Field(description="Complete list of all calculated aspects.")
|
|
355
|
+
all_aspects: List[AspectModel] = Field(description="Complete list of all calculated aspects within the chart.")
|
|
297
356
|
relevant_aspects: List[AspectModel] = Field(description="Filtered list of relevant aspects based on orb settings.")
|
|
298
357
|
active_points: List[AstrologicalPoint] = Field(description="List of active points used in the calculation.")
|
|
299
358
|
active_aspects: List["ActiveAspect"] = Field(description="List of active aspects with their orb settings.")
|
|
300
359
|
|
|
301
360
|
|
|
302
|
-
class
|
|
361
|
+
class DualChartAspectsModel(SubscriptableBaseModel):
|
|
303
362
|
"""
|
|
304
|
-
Model representing all aspects between two astrological
|
|
363
|
+
Model representing all aspects between two astrological charts.
|
|
364
|
+
|
|
365
|
+
This model can be used for any type of dual chart analysis including:
|
|
366
|
+
- Synastry (relationship compatibility)
|
|
367
|
+
- Transit comparisons
|
|
368
|
+
- Composite vs natal comparisons
|
|
369
|
+
- Any other dual chart comparison
|
|
305
370
|
|
|
306
|
-
Contains both all calculated
|
|
307
|
-
between two charts.
|
|
371
|
+
Contains both all calculated aspects and the filtered relevant aspects
|
|
372
|
+
between the two charts.
|
|
308
373
|
"""
|
|
309
374
|
first_subject: Union["AstrologicalSubjectModel", "CompositeSubjectModel", "PlanetReturnModel"] = Field(description="The first astrological subject.")
|
|
310
375
|
second_subject: Union["AstrologicalSubjectModel", "CompositeSubjectModel", "PlanetReturnModel"] = Field(description="The second astrological subject.")
|
|
311
|
-
all_aspects: List[AspectModel] = Field(description="Complete list of all calculated
|
|
312
|
-
relevant_aspects: List[AspectModel] = Field(description="Filtered list of relevant
|
|
376
|
+
all_aspects: List[AspectModel] = Field(description="Complete list of all calculated aspects between the two charts.")
|
|
377
|
+
relevant_aspects: List[AspectModel] = Field(description="Filtered list of relevant aspects based on orb settings.")
|
|
313
378
|
active_points: List[AstrologicalPoint] = Field(description="List of active points used in the calculation.")
|
|
314
379
|
active_aspects: List["ActiveAspect"] = Field(description="List of active aspects with their orb settings.")
|
|
315
380
|
|
|
316
381
|
|
|
382
|
+
# Legacy aliases for backward compatibility
|
|
383
|
+
NatalAspectsModel = SingleChartAspectsModel
|
|
384
|
+
SynastryAspectsModel = DualChartAspectsModel
|
|
385
|
+
|
|
386
|
+
|
|
317
387
|
class TransitsTimeRangeModel(SubscriptableBaseModel):
|
|
318
388
|
"""
|
|
319
389
|
Model representing a collection of transit moments for an astrological subject.
|