kerykeion 3.1.1__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 +58 -141
- kerykeion/aspects/__init__.py +14 -0
- kerykeion/aspects/aspects_factory.py +568 -0
- kerykeion/aspects/aspects_utils.py +164 -0
- kerykeion/astrological_subject_factory.py +1901 -0
- kerykeion/backword.py +820 -0
- kerykeion/chart_data_factory.py +552 -0
- kerykeion/charts/__init__.py +5 -0
- kerykeion/charts/chart_drawer.py +2794 -0
- kerykeion/charts/charts_utils.py +1840 -0
- kerykeion/charts/draw_planets.py +658 -0
- kerykeion/charts/templates/aspect_grid_only.xml +596 -0
- kerykeion/charts/templates/chart.xml +741 -0
- kerykeion/charts/templates/wheel_only.xml +653 -0
- kerykeion/charts/themes/black-and-white.css +148 -0
- kerykeion/charts/themes/classic.css +113 -0
- kerykeion/charts/themes/dark-high-contrast.css +159 -0
- kerykeion/charts/themes/dark.css +160 -0
- kerykeion/charts/themes/light.css +160 -0
- 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 +105 -61
- 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 +70 -0
- kerykeion/kr_types/chart_template_model.py +20 -0
- kerykeion/kr_types/kerykeion_exception.py +20 -0
- kerykeion/kr_types/kr_literals.py +20 -0
- kerykeion/kr_types/kr_models.py +20 -0
- kerykeion/kr_types/settings_models.py +20 -0
- kerykeion/planetary_return_factory.py +805 -0
- kerykeion/relationship_score_factory.py +301 -0
- kerykeion/report.py +779 -0
- 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 -0
- kerykeion/settings/chart_defaults.py +444 -0
- kerykeion/settings/config_constants.py +152 -0
- kerykeion/settings/kerykeion_settings.py +51 -0
- kerykeion/settings/translation_strings.py +1499 -0
- kerykeion/settings/translations.py +74 -0
- kerykeion/sweph/README.md +3 -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/seas_18.se1 +0 -0
- kerykeion/sweph/sefstars.txt +1602 -0
- kerykeion/transits_time_range_factory.py +302 -0
- kerykeion/utilities.py +762 -130
- kerykeion-5.1.9.dist-info/METADATA +1793 -0
- kerykeion-5.1.9.dist-info/RECORD +63 -0
- {kerykeion-3.1.1.dist-info → kerykeion-5.1.9.dist-info}/WHEEL +1 -2
- kerykeion-5.1.9.dist-info/licenses/LICENSE +661 -0
- kerykeion/aspects.py +0 -331
- kerykeion/charts/charts_svg.py +0 -1607
- kerykeion/charts/templates/basic.xml +0 -285
- kerykeion/charts/templates/extended.xml +0 -294
- kerykeion/kr.config.json +0 -464
- kerykeion/main.py +0 -595
- kerykeion/print_all_data.py +0 -44
- kerykeion/relationship_score.py +0 -219
- kerykeion/types.py +0 -190
- kerykeion-3.1.1.dist-info/METADATA +0 -204
- kerykeion-3.1.1.dist-info/RECORD +0 -17
- kerykeion-3.1.1.dist-info/top_level.txt +0 -1
kerykeion/aspects.py
DELETED
|
@@ -1,331 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
This is part of Kerykeion (C) 2022 Giacomo Battaglia
|
|
3
|
-
"""
|
|
4
|
-
#!/usr/bin/env python3
|
|
5
|
-
# -*- coding: utf-8 -*-
|
|
6
|
-
|
|
7
|
-
from kerykeion import KrInstance
|
|
8
|
-
from swisseph import difdeg2n
|
|
9
|
-
import json
|
|
10
|
-
from pathlib import Path
|
|
11
|
-
from typing import Union
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class NatalAspects():
|
|
15
|
-
"""
|
|
16
|
-
Generates an object with all the aspects of a birthcart.
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
def __init__(
|
|
20
|
-
self, kr_object: KrInstance,
|
|
21
|
-
new_settings_file: Union[str, Path, None] = None
|
|
22
|
-
):
|
|
23
|
-
self.user = kr_object
|
|
24
|
-
self.new_settings_file = new_settings_file
|
|
25
|
-
self._parse_json_settings()
|
|
26
|
-
|
|
27
|
-
if not hasattr(self.user, "sun"):
|
|
28
|
-
self.user.__get_all()
|
|
29
|
-
|
|
30
|
-
self.init_point_list = self.user.planets_list + self.user.houses_list
|
|
31
|
-
|
|
32
|
-
def _parse_json_settings(self):
|
|
33
|
-
# Load settings file
|
|
34
|
-
DATADIR = Path(__file__).parent
|
|
35
|
-
|
|
36
|
-
if not self.new_settings_file:
|
|
37
|
-
settings_file = DATADIR / "kr.config.json"
|
|
38
|
-
else:
|
|
39
|
-
settings_file = Path(self.new_settings_file)
|
|
40
|
-
|
|
41
|
-
with open(settings_file, 'r') as f:
|
|
42
|
-
settings = json.load(f)
|
|
43
|
-
|
|
44
|
-
self.colors_settings = settings['colors']
|
|
45
|
-
self.planets_settings = settings['planets']
|
|
46
|
-
self.aspects_settings = settings['aspects']
|
|
47
|
-
self.axes_orbit_settings = settings['axes_orbit']
|
|
48
|
-
|
|
49
|
-
def asp_calc(self, point_one, point_two):
|
|
50
|
-
"""
|
|
51
|
-
Utility function.
|
|
52
|
-
It calculates the aspects between the 2 points.
|
|
53
|
-
Args: first point, second point.
|
|
54
|
-
"""
|
|
55
|
-
|
|
56
|
-
distance = abs(difdeg2n(point_one, point_two))
|
|
57
|
-
diff = abs(point_one - point_two)
|
|
58
|
-
|
|
59
|
-
if int(distance) <= self.aspects_settings[0]['orb']:
|
|
60
|
-
name = self.aspects_settings[0]['name']
|
|
61
|
-
aspect_degrees = self.aspects_settings[0]['degree']
|
|
62
|
-
color = self.colors_settings['aspect_0']
|
|
63
|
-
verdict = True
|
|
64
|
-
aid = 0
|
|
65
|
-
|
|
66
|
-
elif (self.aspects_settings[1]['degree'] - self.aspects_settings[1]['orb']) <= int(distance) <= (self.aspects_settings[1]['degree'] + self.aspects_settings[1]['orb']):
|
|
67
|
-
name = self.aspects_settings[1]['name']
|
|
68
|
-
aspect_degrees = self.aspects_settings[1]['degree']
|
|
69
|
-
color = self.colors_settings['aspect_30']
|
|
70
|
-
verdict = True
|
|
71
|
-
aid = 1
|
|
72
|
-
|
|
73
|
-
elif (self.aspects_settings[2]['degree'] - self.aspects_settings[2]['orb']) <= int(distance) <= (self.aspects_settings[2]['degree'] + self.aspects_settings[2]['orb']):
|
|
74
|
-
name = self.aspects_settings[2]['name']
|
|
75
|
-
aspect_degrees = self.aspects_settings[2]['degree']
|
|
76
|
-
color = self.colors_settings['aspect_45']
|
|
77
|
-
verdict = True
|
|
78
|
-
aid = 2
|
|
79
|
-
|
|
80
|
-
elif (self.aspects_settings[3]['degree'] - self.aspects_settings[3]['orb']) <= int(distance) <= (self.aspects_settings[3]['degree'] + self.aspects_settings[3]['orb']):
|
|
81
|
-
name = self.aspects_settings[3]['name']
|
|
82
|
-
aspect_degrees = self.aspects_settings[3]['degree']
|
|
83
|
-
color = self.colors_settings['aspect_60']
|
|
84
|
-
verdict = True
|
|
85
|
-
aid = 3
|
|
86
|
-
|
|
87
|
-
elif (self.aspects_settings[4]['degree'] - self.aspects_settings[4]['orb']) <= int(distance) <= (self.aspects_settings[4]['degree'] + self.aspects_settings[4]['orb']):
|
|
88
|
-
name = self.aspects_settings[4]['name']
|
|
89
|
-
aspect_degrees = self.aspects_settings[4]['degree']
|
|
90
|
-
color = self.colors_settings['aspect_72']
|
|
91
|
-
verdict = True
|
|
92
|
-
aid = 4
|
|
93
|
-
|
|
94
|
-
elif (self.aspects_settings[5]['degree'] - self.aspects_settings[5]['orb']) <= int(distance) <= (self.aspects_settings[5]['degree'] + self.aspects_settings[5]['orb']):
|
|
95
|
-
name = self.aspects_settings[5]['name']
|
|
96
|
-
aspect_degrees = self.aspects_settings[5]['degree']
|
|
97
|
-
color = self.colors_settings['aspect_90']
|
|
98
|
-
verdict = True
|
|
99
|
-
aid = 5
|
|
100
|
-
|
|
101
|
-
elif (self.aspects_settings[6]['degree'] - self.aspects_settings[6]['orb']) <= int(distance) <= (self.aspects_settings[6]['degree'] + self.aspects_settings[6]['orb']):
|
|
102
|
-
name = self.aspects_settings[6]['name']
|
|
103
|
-
aspect_degrees = self.aspects_settings[6]['degree']
|
|
104
|
-
color = self.colors_settings['aspect_120']
|
|
105
|
-
verdict = True
|
|
106
|
-
aid = 6
|
|
107
|
-
|
|
108
|
-
elif (self.aspects_settings[7]['degree'] - self.aspects_settings[7]['orb']) <= int(distance) <= (self.aspects_settings[7]['degree'] + self.aspects_settings[7]['orb']):
|
|
109
|
-
name = self.aspects_settings[7]['name']
|
|
110
|
-
aspect_degrees = self.aspects_settings[7]['degree']
|
|
111
|
-
color = self.colors_settings['aspect_135']
|
|
112
|
-
verdict = True
|
|
113
|
-
aid = 7
|
|
114
|
-
|
|
115
|
-
elif (self.aspects_settings[8]['degree'] - self.aspects_settings[8]['orb']) <= int(distance) <= (self.aspects_settings[8]['degree'] + self.aspects_settings[8]['orb']):
|
|
116
|
-
name = self.aspects_settings[8]['name']
|
|
117
|
-
aspect_degrees = self.aspects_settings[8]['degree']
|
|
118
|
-
color = self.colors_settings['aspect_144']
|
|
119
|
-
verdict = True
|
|
120
|
-
aid = 8
|
|
121
|
-
|
|
122
|
-
elif (self.aspects_settings[9]['degree'] - self.aspects_settings[9]['orb']) <= int(distance) <= (self.aspects_settings[9]['degree'] + self.aspects_settings[9]['orb']):
|
|
123
|
-
name = self.aspects_settings[9]['name']
|
|
124
|
-
aspect_degrees = self.aspects_settings[9]['degree']
|
|
125
|
-
color = self.colors_settings['aspect_150']
|
|
126
|
-
verdict = True
|
|
127
|
-
aid = 9
|
|
128
|
-
|
|
129
|
-
elif (self.aspects_settings[10]['degree'] - self.aspects_settings[10]['orb']) <= int(distance) <= (self.aspects_settings[10]['degree'] + self.aspects_settings[10]['orb']):
|
|
130
|
-
name = self.aspects_settings[10]['name']
|
|
131
|
-
aspect_degrees = self.aspects_settings[10]['degree']
|
|
132
|
-
color = self.colors_settings['aspect_180']
|
|
133
|
-
verdict = True
|
|
134
|
-
aid = 10
|
|
135
|
-
|
|
136
|
-
else:
|
|
137
|
-
verdict = False
|
|
138
|
-
name = None
|
|
139
|
-
distance = 0
|
|
140
|
-
aspect_degrees = 0
|
|
141
|
-
color = None
|
|
142
|
-
aid = None
|
|
143
|
-
|
|
144
|
-
return verdict, name, distance - aspect_degrees, aspect_degrees, color, aid, diff
|
|
145
|
-
|
|
146
|
-
def p_id_decoder(self, name):
|
|
147
|
-
"""
|
|
148
|
-
Check if the name of the planet is the same in the settings and return
|
|
149
|
-
the correct id for the planet.
|
|
150
|
-
"""
|
|
151
|
-
str_name = str(name)
|
|
152
|
-
for a in self.planets_settings:
|
|
153
|
-
if a['name'] == str_name:
|
|
154
|
-
result = a['id']
|
|
155
|
-
return result
|
|
156
|
-
|
|
157
|
-
def filter_by_settings(self, init_point_list):
|
|
158
|
-
"""
|
|
159
|
-
Creates a list of all the desired
|
|
160
|
-
points filtering by the settings.
|
|
161
|
-
"""
|
|
162
|
-
|
|
163
|
-
set_points_name = []
|
|
164
|
-
for p in self.planets_settings:
|
|
165
|
-
if p['visible']:
|
|
166
|
-
set_points_name.append(p['name'])
|
|
167
|
-
|
|
168
|
-
point_list = []
|
|
169
|
-
for l in init_point_list:
|
|
170
|
-
if l['name'] in set_points_name:
|
|
171
|
-
point_list.append(l)
|
|
172
|
-
|
|
173
|
-
return point_list
|
|
174
|
-
|
|
175
|
-
def get_all_aspects(self):
|
|
176
|
-
"""
|
|
177
|
-
Return all the aspects of the points in the natal chart in a dictionary,
|
|
178
|
-
first all the individual aspects of each planet, second the aspects
|
|
179
|
-
whitout repetitions.
|
|
180
|
-
"""
|
|
181
|
-
|
|
182
|
-
point_list = self.filter_by_settings(self.init_point_list)
|
|
183
|
-
|
|
184
|
-
self.all_aspects_list = []
|
|
185
|
-
|
|
186
|
-
for first in range(len(point_list)):
|
|
187
|
-
# Generates the aspects list whitout repetitions
|
|
188
|
-
for second in range(first + 1, len(point_list)):
|
|
189
|
-
|
|
190
|
-
verdict, name, orbit, aspect_degrees, color, aid, diff = self.asp_calc(point_list[first]["abs_pos"],
|
|
191
|
-
point_list[second]["abs_pos"])
|
|
192
|
-
|
|
193
|
-
if verdict == True:
|
|
194
|
-
d_asp = {"p1_name": point_list[first]['name'],
|
|
195
|
-
"p1_abs_pos": point_list[first]['abs_pos'],
|
|
196
|
-
"p2_name": point_list[second]['name'],
|
|
197
|
-
"p2_abs_pos": point_list[second]['abs_pos'],
|
|
198
|
-
"aspect": name,
|
|
199
|
-
"orbit": orbit,
|
|
200
|
-
"aspect_degrees": aspect_degrees,
|
|
201
|
-
"color": color,
|
|
202
|
-
"aid": aid,
|
|
203
|
-
"diff": diff,
|
|
204
|
-
"p1": self.p_id_decoder(point_list[first]['name']),
|
|
205
|
-
"p2": self.p_id_decoder(point_list[second]['name'],)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
self.all_aspects_list.append(d_asp)
|
|
209
|
-
|
|
210
|
-
return self.all_aspects_list
|
|
211
|
-
|
|
212
|
-
def get_relevant_aspects(self):
|
|
213
|
-
"""
|
|
214
|
-
Filters the aspects list with the desired points, in this case
|
|
215
|
-
the most important are hardcoded.
|
|
216
|
-
Set the list with set_points and creating a list with the names
|
|
217
|
-
or the numbers of the houses.
|
|
218
|
-
"""
|
|
219
|
-
|
|
220
|
-
self.get_all_aspects()
|
|
221
|
-
|
|
222
|
-
aspects_filtered = []
|
|
223
|
-
for a in self.all_aspects_list:
|
|
224
|
-
if self.aspects_settings[a["aid"]]["visible"] == True:
|
|
225
|
-
aspects_filtered.append(a)
|
|
226
|
-
|
|
227
|
-
axes_list = [
|
|
228
|
-
"First House",
|
|
229
|
-
"Tenth House",
|
|
230
|
-
"Seventh House",
|
|
231
|
-
"Fourth House",
|
|
232
|
-
]
|
|
233
|
-
counter = 0
|
|
234
|
-
|
|
235
|
-
aspects_list_subtract = []
|
|
236
|
-
for a in aspects_filtered:
|
|
237
|
-
counter += 1
|
|
238
|
-
name_p1 = str(a['p1_name'])
|
|
239
|
-
name_p2 = str(a['p2_name'])
|
|
240
|
-
|
|
241
|
-
if name_p1 in axes_list:
|
|
242
|
-
if abs(a['orbit']) >= self.axes_orbit_settings:
|
|
243
|
-
aspects_list_subtract.append(a)
|
|
244
|
-
|
|
245
|
-
elif name_p2 in axes_list:
|
|
246
|
-
if abs(a['orbit']) >= self.axes_orbit_settings:
|
|
247
|
-
aspects_list_subtract.append(a)
|
|
248
|
-
|
|
249
|
-
self.aspects = [
|
|
250
|
-
item for item in aspects_filtered if item not in aspects_list_subtract]
|
|
251
|
-
|
|
252
|
-
return self.aspects
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
class CompositeAspects(NatalAspects):
|
|
256
|
-
"""
|
|
257
|
-
Generates an object with all the aspects between two persons.
|
|
258
|
-
"""
|
|
259
|
-
|
|
260
|
-
def __init__(self, kr_object_one: KrInstance, kr_object_two: KrInstance, new_settings_file: Union[str, Path, None] = None):
|
|
261
|
-
self.first_user = kr_object_one
|
|
262
|
-
self.second_user = kr_object_two
|
|
263
|
-
|
|
264
|
-
self.new_settings_file = new_settings_file
|
|
265
|
-
self._parse_json_settings()
|
|
266
|
-
|
|
267
|
-
if not hasattr(self.first_user, "sun"):
|
|
268
|
-
self.first_user.__get_all()
|
|
269
|
-
|
|
270
|
-
if not hasattr(self.second_user, "sun"):
|
|
271
|
-
self.second_user.__get_all()
|
|
272
|
-
|
|
273
|
-
self.first_init_point_list = self.first_user.planets_list + \
|
|
274
|
-
self.first_user.houses_list
|
|
275
|
-
self.second_init_point_list = self.second_user.planets_list + \
|
|
276
|
-
self.second_user.houses_list
|
|
277
|
-
|
|
278
|
-
def get_all_aspects(self):
|
|
279
|
-
"""
|
|
280
|
-
Return all the aspects of the points in the natal chart in a dictionary,
|
|
281
|
-
first all the individual aspects of each planet, second the aspects
|
|
282
|
-
whitout repetitions.
|
|
283
|
-
"""
|
|
284
|
-
|
|
285
|
-
f_1 = self.filter_by_settings(self.first_init_point_list)
|
|
286
|
-
f_2 = self.filter_by_settings(self.second_init_point_list)
|
|
287
|
-
|
|
288
|
-
self.all_aspects_list = []
|
|
289
|
-
|
|
290
|
-
for first in range(len(f_1)):
|
|
291
|
-
# Generates the aspects list whitout repetitions
|
|
292
|
-
for second in range(len(f_2)):
|
|
293
|
-
|
|
294
|
-
verdict, name, orbit, aspect_degrees, color, aid, diff = self.asp_calc(f_1[first]["abs_pos"],
|
|
295
|
-
f_2[second]["abs_pos"])
|
|
296
|
-
|
|
297
|
-
if verdict == True:
|
|
298
|
-
d_asp = {"p1_name": f_1[first]['name'],
|
|
299
|
-
"p1_abs_pos": f_1[first]['abs_pos'],
|
|
300
|
-
"p2_name": f_2[second]['name'],
|
|
301
|
-
"p2_abs_pos": f_2[second]['abs_pos'],
|
|
302
|
-
"aspect": name,
|
|
303
|
-
"orbit": orbit,
|
|
304
|
-
"aspect_degrees": aspect_degrees,
|
|
305
|
-
"color": color,
|
|
306
|
-
"aid": aid,
|
|
307
|
-
"diff": diff,
|
|
308
|
-
"p1": self.p_id_decoder(f_1[first]['name']),
|
|
309
|
-
"p2": self.p_id_decoder(f_2[second]['name'],)
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
self.all_aspects_list.append(d_asp)
|
|
313
|
-
|
|
314
|
-
return self.all_aspects_list
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
if __name__ == "__main__":
|
|
318
|
-
kanye = KrInstance("Kanye", 1977, 6, 8, 8, 45, "New York")
|
|
319
|
-
jack = KrInstance("Jack", 1990, 6, 15, 13, 00, "Montichiari")
|
|
320
|
-
# kanye.get_all()
|
|
321
|
-
# natal = NatalAspects(kanye)
|
|
322
|
-
# natal.get_relevant_aspects()
|
|
323
|
-
# for a in natal.aspects:
|
|
324
|
-
# print(a['p1_name'], a['p2_name'], a['orbit'])
|
|
325
|
-
cm = CompositeAspects(kanye, jack)
|
|
326
|
-
res = cm.get_relevant_aspects()
|
|
327
|
-
for a in res:
|
|
328
|
-
print(a['p1_name'], 'number is', a['p1'], a['p2_name'],
|
|
329
|
-
'number is', a['p2'], a['orbit'], a['aspect'])
|
|
330
|
-
print(len(res))
|
|
331
|
-
print(res[0])
|