kerykeion 4.8.1__py3-none-any.whl → 4.14.2__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 +3 -95
- kerykeion/aspects/aspects_utils.py +10 -21
- kerykeion/aspects/natal_aspects.py +9 -2
- kerykeion/aspects/synastry_aspects.py +11 -4
- kerykeion/astrological_subject.py +386 -146
- kerykeion/charts/charts_utils.py +390 -25
- kerykeion/charts/kerykeion_chart_svg.py +162 -439
- kerykeion/charts/templates/chart.xml +381 -358
- kerykeion/enums.py +1 -0
- kerykeion/ephemeris_data.py +174 -0
- kerykeion/fetch_geonames.py +2 -3
- kerykeion/kr_types/chart_types.py +4 -9
- kerykeion/kr_types/kr_literals.py +87 -54
- kerykeion/kr_types/kr_models.py +75 -97
- kerykeion/kr_types/settings_models.py +14 -28
- kerykeion/settings/kr.config.json +19 -5
- kerykeion/utilities.py +40 -23
- {kerykeion-4.8.1.dist-info → kerykeion-4.14.2.dist-info}/METADATA +128 -32
- kerykeion-4.14.2.dist-info/RECORD +33 -0
- kerykeion-4.8.1.dist-info/RECORD +0 -32
- {kerykeion-4.8.1.dist-info → kerykeion-4.14.2.dist-info}/LICENSE +0 -0
- {kerykeion-4.8.1.dist-info → kerykeion-4.14.2.dist-info}/WHEEL +0 -0
- {kerykeion-4.8.1.dist-info → kerykeion-4.14.2.dist-info}/entry_points.txt +0 -0
kerykeion/__init__.py
CHANGED
|
@@ -1,101 +1,8 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Kerykeion is a python library for Astrology.
|
|
6
|
-
It can calculate all the planet and house position,
|
|
7
|
-
also it can calculate the aspects of a single persone or between two, you can set how many planets you
|
|
8
|
-
need in the settings in the utility module.
|
|
9
|
-
It also can generate an SVG of a birthchart, a synastry chart or a transit chart.
|
|
10
|
-
|
|
11
|
-
Here some examples:
|
|
12
|
-
|
|
13
|
-
```python
|
|
14
|
-
|
|
15
|
-
# Import the main class for creating a kerykeion instance:
|
|
16
|
-
>>> from kerykeion import AstrologicalSubject
|
|
17
|
-
|
|
18
|
-
# Create a kerykeion instance:
|
|
19
|
-
# Args: Name, year, month, day, hour, minuts, city, nation(optional)
|
|
20
|
-
>>> kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta")
|
|
21
|
-
|
|
22
|
-
# Get the information about the sun in the chart:
|
|
23
|
-
# (The position of the planets always starts at 0)
|
|
24
|
-
>>> kanye.sun
|
|
25
|
-
{'name': 'Sun', 'quality': 'Mutable', 'element': 'Air', 'sign': 'Gem', 'sign_num': 2, 'pos': 17.598992059774275, 'abs_pos': 77.59899205977428, 'emoji': '♊️', 'house': '12th House', 'retrograde': False}
|
|
26
|
-
|
|
27
|
-
# Get informations about the first house:
|
|
28
|
-
>>> kanye.first_house
|
|
29
|
-
{'name': '1', 'quality': 'Cardinal', 'element': 'Water', 'sign': 'Can', 'sign_num': 3, 'pos': 17.995779673209114, 'abs_pos': 107.99577967320911, 'emoji': '♋️'}
|
|
30
|
-
|
|
31
|
-
# Get element of the moon sign:
|
|
32
|
-
>>> kanye.moon.get("element")
|
|
33
|
-
'Water'
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Generate a SVG of the birthchart:
|
|
38
|
-
|
|
39
|
-
```python
|
|
40
|
-
>>> from kerykeion import AstrologicalSubject, KerykeionChartSVG
|
|
41
|
-
|
|
42
|
-
>>> first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma")
|
|
43
|
-
>>> second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma")
|
|
44
|
-
|
|
45
|
-
# Set the type, it can be Natal, Synastry or Transit
|
|
46
|
-
|
|
47
|
-
>>> name = KerykeionChartSVG(first, chart_type="Synastry", second_obj=second)
|
|
48
|
-
>>> name.makeSVG()
|
|
49
|
-
>>> print(len(name.aspects_list))
|
|
50
|
-
>>> Generating kerykeion object for Jack...
|
|
51
|
-
Generating kerykeion object for Jane...
|
|
52
|
-
Jack birth location: Roma, 41.89193, 12.51133
|
|
53
|
-
SVG Generated Correctly
|
|
54
|
-
38
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-

|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
## Other exeples of possibles usecase
|
|
62
|
-
|
|
63
|
-
```python
|
|
64
|
-
# Get all aspects between two persons:
|
|
65
|
-
|
|
66
|
-
>>> from kerykeion import SynastryAspects, AstrologicalSubject
|
|
67
|
-
>>> first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma")
|
|
68
|
-
>>> second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma")
|
|
69
|
-
|
|
70
|
-
>>> name = SynastryAspects(first, second)
|
|
71
|
-
>>> aspect_list = name.relevant_aspects
|
|
72
|
-
>>> print(aspect_list[0])
|
|
73
|
-
|
|
74
|
-
Generating kerykeion object for Jack...
|
|
75
|
-
Generating kerykeion object for Jane...
|
|
76
|
-
{'p1_name': 'Sun', 'p1_abs_pos': 84.17867971515636, 'p2_name': 'Sun', 'p2_abs_pos': 211.90472999502984, 'aspect': 'trine', 'orbit': 7.726050279873476, 'aspect_degrees': 120, 'color': '#36d100', 'aid': 6, 'diff': 127.72605027987348, 'p1': 0, 'p2': 0}
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Documentation
|
|
81
|
-
|
|
82
|
-
Most of the functions and the classes are self documented by the types and have docstrings.
|
|
83
|
-
An auto-generated documentation [is available here](https://g-battaglia.github.io/kerykeion).
|
|
84
|
-
|
|
85
|
-
Sooner or later I'll try to write an extensive documentation.
|
|
86
|
-
|
|
87
|
-
## Installation
|
|
88
|
-
|
|
89
|
-
Kerykeion is a Python 3 package, make sure you have Python 3 installed on your system.
|
|
90
|
-
|
|
91
|
-
## Development
|
|
92
|
-
|
|
93
|
-
You can clone this repository or download a zip file using the right side buttons.
|
|
94
|
-
|
|
95
|
-
## Contributing
|
|
96
|
-
|
|
97
|
-
Feel free to contribute to the code!
|
|
3
|
+
This is part of Kerykeion (C) 2024 Giacomo Battaglia
|
|
98
4
|
|
|
5
|
+
.. include:: ../README.md
|
|
99
6
|
"""
|
|
100
7
|
|
|
101
8
|
# Local
|
|
@@ -107,3 +14,4 @@ from .aspects import SynastryAspects, NatalAspects
|
|
|
107
14
|
from .report import Report
|
|
108
15
|
from .settings import KerykeionSettingsModel, get_settings
|
|
109
16
|
from .enums import Planets, Aspects, Signs
|
|
17
|
+
from .ephemeris_data import EphemerisDataFactory
|
|
@@ -23,7 +23,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
23
23
|
if int(distance) <= aspects_settings[0]["orb"]:
|
|
24
24
|
name = aspects_settings[0]["name"]
|
|
25
25
|
aspect_degrees = aspects_settings[0]["degree"]
|
|
26
|
-
color = aspects_settings[0]["color"]
|
|
27
26
|
verdict = True
|
|
28
27
|
aid = 0
|
|
29
28
|
|
|
@@ -34,7 +33,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
34
33
|
):
|
|
35
34
|
name = aspects_settings[1]["name"]
|
|
36
35
|
aspect_degrees = aspects_settings[1]["degree"]
|
|
37
|
-
color = aspects_settings[1]["color"]
|
|
38
36
|
verdict = True
|
|
39
37
|
aid = 1
|
|
40
38
|
|
|
@@ -45,7 +43,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
45
43
|
):
|
|
46
44
|
name = aspects_settings[2]["name"]
|
|
47
45
|
aspect_degrees = aspects_settings[2]["degree"]
|
|
48
|
-
color = aspects_settings[2]["color"]
|
|
49
46
|
verdict = True
|
|
50
47
|
aid = 2
|
|
51
48
|
|
|
@@ -56,7 +53,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
56
53
|
):
|
|
57
54
|
name = aspects_settings[3]["name"]
|
|
58
55
|
aspect_degrees = aspects_settings[3]["degree"]
|
|
59
|
-
color = aspects_settings[3]["color"]
|
|
60
56
|
verdict = True
|
|
61
57
|
aid = 3
|
|
62
58
|
|
|
@@ -67,7 +63,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
67
63
|
):
|
|
68
64
|
name = aspects_settings[4]["name"]
|
|
69
65
|
aspect_degrees = aspects_settings[4]["degree"]
|
|
70
|
-
color = aspects_settings[4]["color"]
|
|
71
66
|
verdict = True
|
|
72
67
|
aid = 4
|
|
73
68
|
|
|
@@ -78,7 +73,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
78
73
|
):
|
|
79
74
|
name = aspects_settings[5]["name"]
|
|
80
75
|
aspect_degrees = aspects_settings[5]["degree"]
|
|
81
|
-
color = aspects_settings[5]["color"]
|
|
82
76
|
verdict = True
|
|
83
77
|
aid = 5
|
|
84
78
|
|
|
@@ -89,7 +83,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
89
83
|
):
|
|
90
84
|
name = aspects_settings[6]["name"]
|
|
91
85
|
aspect_degrees = aspects_settings[6]["degree"]
|
|
92
|
-
color = aspects_settings[6]["color"]
|
|
93
86
|
verdict = True
|
|
94
87
|
aid = 6
|
|
95
88
|
|
|
@@ -100,7 +93,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
100
93
|
):
|
|
101
94
|
name = aspects_settings[7]["name"]
|
|
102
95
|
aspect_degrees = aspects_settings[7]["degree"]
|
|
103
|
-
color = aspects_settings[7]["color"]
|
|
104
96
|
verdict = True
|
|
105
97
|
aid = 7
|
|
106
98
|
|
|
@@ -111,7 +103,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
111
103
|
):
|
|
112
104
|
name = aspects_settings[8]["name"]
|
|
113
105
|
aspect_degrees = aspects_settings[8]["degree"]
|
|
114
|
-
color = aspects_settings[8]["color"]
|
|
115
106
|
verdict = True
|
|
116
107
|
aid = 8
|
|
117
108
|
|
|
@@ -122,7 +113,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
122
113
|
):
|
|
123
114
|
name = aspects_settings[9]["name"]
|
|
124
115
|
aspect_degrees = aspects_settings[9]["degree"]
|
|
125
|
-
color = aspects_settings[9]["color"]
|
|
126
116
|
verdict = True
|
|
127
117
|
aid = 9
|
|
128
118
|
|
|
@@ -133,7 +123,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
133
123
|
):
|
|
134
124
|
name = aspects_settings[10]["name"]
|
|
135
125
|
aspect_degrees = aspects_settings[10]["degree"]
|
|
136
|
-
color = aspects_settings[10]["color"]
|
|
137
126
|
verdict = True
|
|
138
127
|
aid = 10
|
|
139
128
|
|
|
@@ -142,18 +131,18 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
142
131
|
name = None
|
|
143
132
|
distance = 0
|
|
144
133
|
aspect_degrees = 0
|
|
145
|
-
color = None
|
|
146
134
|
aid = None
|
|
147
135
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
aspect_degrees,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
"verdict": verdict,
|
|
139
|
+
"name": name,
|
|
140
|
+
"orbit": distance - aspect_degrees,
|
|
141
|
+
"distance": distance - aspect_degrees,
|
|
142
|
+
"aspect_degrees": aspect_degrees,
|
|
143
|
+
"aid": aid,
|
|
144
|
+
"diff": diff
|
|
145
|
+
}
|
|
157
146
|
|
|
158
147
|
|
|
159
148
|
def planet_id_decoder(planets_settings: dict, name: str):
|
|
@@ -52,10 +52,18 @@ class NatalAspects:
|
|
|
52
52
|
for first in range(len(active_points_list)):
|
|
53
53
|
# Generates the aspects list without repetitions
|
|
54
54
|
for second in range(first + 1, len(active_points_list)):
|
|
55
|
-
|
|
55
|
+
aspect = get_aspect_from_two_points(
|
|
56
56
|
self.aspects_settings, active_points_list[first]["abs_pos"], active_points_list[second]["abs_pos"]
|
|
57
57
|
)
|
|
58
58
|
|
|
59
|
+
verdict = aspect["verdict"]
|
|
60
|
+
name = aspect["name"]
|
|
61
|
+
orbit = aspect["orbit"]
|
|
62
|
+
aspect_degrees = aspect["aspect_degrees"]
|
|
63
|
+
aid = aspect["aid"]
|
|
64
|
+
diff = aspect["diff"]
|
|
65
|
+
|
|
66
|
+
|
|
59
67
|
if verdict == True:
|
|
60
68
|
d_asp = {
|
|
61
69
|
"p1_name": active_points_list[first]["name"],
|
|
@@ -65,7 +73,6 @@ class NatalAspects:
|
|
|
65
73
|
"aspect": name,
|
|
66
74
|
"orbit": orbit,
|
|
67
75
|
"aspect_degrees": aspect_degrees,
|
|
68
|
-
"color": color,
|
|
69
76
|
"aid": aid,
|
|
70
77
|
"diff": diff,
|
|
71
78
|
"p1": planet_id_decoder(self.celestial_points, active_points_list[first]["name"]),
|
|
@@ -60,12 +60,20 @@ class SynastryAspects(NatalAspects):
|
|
|
60
60
|
for first in range(len(first_active_points_list)):
|
|
61
61
|
# Generates the aspects list whitout repetitions
|
|
62
62
|
for second in range(len(second_active_points_list)):
|
|
63
|
-
|
|
63
|
+
aspect = get_aspect_from_two_points(
|
|
64
64
|
self.aspects_settings,
|
|
65
65
|
first_active_points_list[first]["abs_pos"],
|
|
66
66
|
second_active_points_list[second]["abs_pos"],
|
|
67
67
|
)
|
|
68
68
|
|
|
69
|
+
verdict = aspect["verdict"]
|
|
70
|
+
name = aspect["name"]
|
|
71
|
+
orbit = aspect["orbit"]
|
|
72
|
+
aspect_degrees = aspect["aspect_degrees"]
|
|
73
|
+
aid = aspect["aid"]
|
|
74
|
+
diff = aspect["diff"]
|
|
75
|
+
|
|
76
|
+
|
|
69
77
|
if verdict == True:
|
|
70
78
|
d_asp = {
|
|
71
79
|
"p1_name": first_active_points_list[first]["name"],
|
|
@@ -75,7 +83,6 @@ class SynastryAspects(NatalAspects):
|
|
|
75
83
|
"aspect": name,
|
|
76
84
|
"orbit": orbit,
|
|
77
85
|
"aspect_degrees": aspect_degrees,
|
|
78
|
-
"color": color,
|
|
79
86
|
"aid": aid,
|
|
80
87
|
"diff": diff,
|
|
81
88
|
"p1": planet_id_decoder(
|
|
@@ -96,8 +103,8 @@ if __name__ == "__main__":
|
|
|
96
103
|
from kerykeion.utilities import setup_logging
|
|
97
104
|
setup_logging(level="debug")
|
|
98
105
|
|
|
99
|
-
john = AstrologicalSubject("John", 1940, 10, 9,
|
|
100
|
-
yoko = AstrologicalSubject("Yoko", 1933, 2, 18,
|
|
106
|
+
john = AstrologicalSubject("John", 1940, 10, 9, 18, 30, "Liverpool")
|
|
107
|
+
yoko = AstrologicalSubject("Yoko", 1933, 2, 18, 18, 30, "Tokyo", "JP")
|
|
101
108
|
|
|
102
109
|
synastry_aspects = SynastryAspects(john, yoko)
|
|
103
110
|
|