kerykeion 4.0.6__py3-none-any.whl → 4.12.3__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 -96
- kerykeion/aspects/__init__.py +2 -2
- kerykeion/aspects/aspects_utils.py +174 -0
- kerykeion/aspects/natal_aspects.py +51 -222
- kerykeion/aspects/synastry_aspects.py +45 -23
- kerykeion/astrological_subject.py +453 -199
- kerykeion/charts/__init__.py +1 -1
- kerykeion/charts/charts_utils.py +339 -5
- kerykeion/charts/kerykeion_chart_svg.py +441 -500
- kerykeion/charts/templates/chart.xml +362 -330
- kerykeion/enums.py +50 -0
- kerykeion/fetch_geonames.py +16 -25
- kerykeion/kr_types/__init__.py +7 -0
- kerykeion/kr_types/chart_types.py +33 -32
- kerykeion/kr_types/kerykeion_exception.py +1 -1
- kerykeion/kr_types/kr_literals.py +87 -44
- kerykeion/kr_types/kr_models.py +42 -78
- kerykeion/kr_types/settings_models.py +163 -0
- kerykeion/relationship_score.py +7 -13
- kerykeion/report.py +3 -0
- kerykeion/settings/__init__.py +1 -1
- kerykeion/settings/kerykeion_settings.py +13 -183
- kerykeion/settings/kr.config.json +9 -9
- kerykeion/utilities.py +184 -22
- {kerykeion-4.0.6.dist-info → kerykeion-4.12.3.dist-info}/METADATA +142 -32
- kerykeion-4.12.3.dist-info/RECORD +32 -0
- {kerykeion-4.0.6.dist-info → kerykeion-4.12.3.dist-info}/WHEEL +1 -1
- kerykeion-4.0.6.dist-info/RECORD +0 -29
- {kerykeion-4.0.6.dist-info → kerykeion-4.12.3.dist-info}/LICENSE +0 -0
- {kerykeion-4.0.6.dist-info → kerykeion-4.12.3.dist-info}/entry_points.txt +0 -0
kerykeion/utilities.py
CHANGED
|
@@ -1,47 +1,46 @@
|
|
|
1
|
-
from kerykeion.kr_types import KerykeionPointModel, KerykeionException
|
|
2
|
-
from
|
|
3
|
-
from typing import Union
|
|
4
|
-
|
|
1
|
+
from kerykeion.kr_types import KerykeionPointModel, KerykeionException, KerykeionSettingsModel, AstrologicalSubjectModel
|
|
2
|
+
from kerykeion.kr_types.kr_literals import LunarPhaseEmoji, LunarPhaseName, PointType, Planet
|
|
3
|
+
from typing import Union
|
|
4
|
+
import logging
|
|
5
|
+
import math
|
|
5
6
|
|
|
6
|
-
logger = getLogger(__name__)
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
def get_number_from_name(name:
|
|
9
|
+
def get_number_from_name(name: Planet) -> int:
|
|
10
10
|
"""Utility function, gets planet id from the name."""
|
|
11
|
-
name = name.lower()
|
|
12
11
|
|
|
13
|
-
if name == "
|
|
12
|
+
if name == "Sun":
|
|
14
13
|
return 0
|
|
15
|
-
elif name == "
|
|
14
|
+
elif name == "Moon":
|
|
16
15
|
return 1
|
|
17
|
-
elif name == "
|
|
16
|
+
elif name == "Mercury":
|
|
18
17
|
return 2
|
|
19
|
-
elif name == "
|
|
18
|
+
elif name == "Venus":
|
|
20
19
|
return 3
|
|
21
|
-
elif name == "
|
|
20
|
+
elif name == "Mars":
|
|
22
21
|
return 4
|
|
23
|
-
elif name == "
|
|
22
|
+
elif name == "Jupiter":
|
|
24
23
|
return 5
|
|
25
|
-
elif name == "
|
|
24
|
+
elif name == "Saturn":
|
|
26
25
|
return 6
|
|
27
|
-
elif name == "
|
|
26
|
+
elif name == "Uranus":
|
|
28
27
|
return 7
|
|
29
|
-
elif name == "
|
|
28
|
+
elif name == "Neptune":
|
|
30
29
|
return 8
|
|
31
|
-
elif name == "
|
|
30
|
+
elif name == "Pluto":
|
|
32
31
|
return 9
|
|
33
|
-
elif name == "
|
|
32
|
+
elif name == "Mean_Node":
|
|
34
33
|
return 10
|
|
35
|
-
elif name == "
|
|
34
|
+
elif name == "True_Node":
|
|
36
35
|
return 11
|
|
37
|
-
elif name == "
|
|
36
|
+
elif name == "Chiron":
|
|
38
37
|
return 15
|
|
39
38
|
else:
|
|
40
|
-
|
|
39
|
+
raise KerykeionException(f"Error in getting number from name! Name: {name}")
|
|
41
40
|
|
|
42
41
|
|
|
43
42
|
def calculate_position(
|
|
44
|
-
degree: Union[int, float], number_name: str, point_type:
|
|
43
|
+
degree: Union[int, float], number_name: str, point_type: PointType
|
|
45
44
|
) -> KerykeionPointModel:
|
|
46
45
|
"""Utility function to create a dictionary dividing the houses or the planets list."""
|
|
47
46
|
|
|
@@ -206,3 +205,166 @@ def calculate_position(
|
|
|
206
205
|
|
|
207
206
|
return KerykeionPointModel(**dictionary)
|
|
208
207
|
|
|
208
|
+
|
|
209
|
+
def setup_logging(level: str) -> None:
|
|
210
|
+
"""
|
|
211
|
+
Setup logging for testing.
|
|
212
|
+
|
|
213
|
+
Args:
|
|
214
|
+
level: Log level as a string, options: debug, info, warning, error
|
|
215
|
+
"""
|
|
216
|
+
logging_options: dict[str, int] = {
|
|
217
|
+
"debug": logging.DEBUG,
|
|
218
|
+
"info": logging.INFO,
|
|
219
|
+
"warning": logging.WARNING,
|
|
220
|
+
"error": logging.ERROR,
|
|
221
|
+
}
|
|
222
|
+
format: str = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
223
|
+
loglevel: int = logging_options.get(level, logging.INFO)
|
|
224
|
+
logging.basicConfig(format=format, level=loglevel)
|
|
225
|
+
|
|
226
|
+
def check_if_point_between(
|
|
227
|
+
start_point: Union[int, float], end_point: Union[int, float], evaluated_point: Union[int, float]
|
|
228
|
+
) -> bool:
|
|
229
|
+
"""
|
|
230
|
+
Finds if a point is between two other in a circle.
|
|
231
|
+
|
|
232
|
+
Args:
|
|
233
|
+
- start_point: The first point
|
|
234
|
+
- end_point: The second point
|
|
235
|
+
- point: The point to check if it is between start_point and end_point
|
|
236
|
+
|
|
237
|
+
Returns:
|
|
238
|
+
- True if point is between start_point and end_point, False otherwise
|
|
239
|
+
"""
|
|
240
|
+
|
|
241
|
+
p1_p2 = math.fmod(end_point - start_point + 360, 360)
|
|
242
|
+
p1_p3 = math.fmod(evaluated_point - start_point + 360, 360)
|
|
243
|
+
|
|
244
|
+
if (p1_p2 <= 180) != (p1_p3 > p1_p2):
|
|
245
|
+
return True
|
|
246
|
+
else:
|
|
247
|
+
return False
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def get_planet_house(planet_position_degree: Union[int, float], houses_degree_ut_list: list) -> str:
|
|
251
|
+
"""
|
|
252
|
+
Returns the house in which a planet is located.
|
|
253
|
+
|
|
254
|
+
Args:
|
|
255
|
+
- planet_position_degree: The position of the planet in degrees
|
|
256
|
+
- houses_degree_ut_list: A list of the houses in degrees (0-360)
|
|
257
|
+
|
|
258
|
+
Returns:
|
|
259
|
+
- The house in which the planet is located
|
|
260
|
+
"""
|
|
261
|
+
|
|
262
|
+
house = None
|
|
263
|
+
if check_if_point_between(houses_degree_ut_list[0], houses_degree_ut_list[1], planet_position_degree) == True:
|
|
264
|
+
house = "First_House"
|
|
265
|
+
elif check_if_point_between(houses_degree_ut_list[1], houses_degree_ut_list[2], planet_position_degree) == True:
|
|
266
|
+
house = "Second_House"
|
|
267
|
+
elif check_if_point_between(houses_degree_ut_list[2], houses_degree_ut_list[3], planet_position_degree) == True:
|
|
268
|
+
house = "Third_House"
|
|
269
|
+
elif check_if_point_between(houses_degree_ut_list[3], houses_degree_ut_list[4], planet_position_degree) == True:
|
|
270
|
+
house = "Fourth_House"
|
|
271
|
+
elif check_if_point_between(houses_degree_ut_list[4], houses_degree_ut_list[5], planet_position_degree) == True:
|
|
272
|
+
house = "Fifth_House"
|
|
273
|
+
elif check_if_point_between(houses_degree_ut_list[5], houses_degree_ut_list[6], planet_position_degree) == True:
|
|
274
|
+
house = "Sixth_House"
|
|
275
|
+
elif check_if_point_between(houses_degree_ut_list[6], houses_degree_ut_list[7], planet_position_degree) == True:
|
|
276
|
+
house = "Seventh_House"
|
|
277
|
+
elif check_if_point_between(houses_degree_ut_list[7], houses_degree_ut_list[8], planet_position_degree) == True:
|
|
278
|
+
house = "Eighth_House"
|
|
279
|
+
elif check_if_point_between(houses_degree_ut_list[8], houses_degree_ut_list[9], planet_position_degree) == True:
|
|
280
|
+
house = "Ninth_House"
|
|
281
|
+
elif check_if_point_between(houses_degree_ut_list[9], houses_degree_ut_list[10], planet_position_degree) == True:
|
|
282
|
+
house = "Tenth_House"
|
|
283
|
+
elif check_if_point_between(houses_degree_ut_list[10], houses_degree_ut_list[11], planet_position_degree) == True:
|
|
284
|
+
house = "Eleventh_House"
|
|
285
|
+
elif check_if_point_between(houses_degree_ut_list[11], houses_degree_ut_list[0], planet_position_degree) == True:
|
|
286
|
+
house = "Twelfth_House"
|
|
287
|
+
else:
|
|
288
|
+
raise ValueError("Error in house calculation, planet: ", planet_position_degree, "houses: ", houses_degree_ut_list)
|
|
289
|
+
|
|
290
|
+
return house
|
|
291
|
+
|
|
292
|
+
def get_moon_emoji_from_phase_int(phase: int) -> LunarPhaseEmoji:
|
|
293
|
+
"""
|
|
294
|
+
Returns the emoji of the moon phase.
|
|
295
|
+
|
|
296
|
+
Args:
|
|
297
|
+
- phase: The phase of the moon (0-28)
|
|
298
|
+
|
|
299
|
+
Returns:
|
|
300
|
+
- The emoji of the moon phase
|
|
301
|
+
"""
|
|
302
|
+
|
|
303
|
+
if phase == 1:
|
|
304
|
+
result = "🌑"
|
|
305
|
+
elif phase < 7:
|
|
306
|
+
result = "🌒"
|
|
307
|
+
elif 7 <= phase <= 9:
|
|
308
|
+
result = "🌓"
|
|
309
|
+
elif phase < 14:
|
|
310
|
+
result = "🌔"
|
|
311
|
+
elif phase == 14:
|
|
312
|
+
result = "🌕"
|
|
313
|
+
elif phase < 20:
|
|
314
|
+
result = "🌖"
|
|
315
|
+
elif 20 <= phase <= 22:
|
|
316
|
+
result = "🌗"
|
|
317
|
+
elif phase <= 28:
|
|
318
|
+
result = "🌘"
|
|
319
|
+
|
|
320
|
+
else:
|
|
321
|
+
raise KerykeionException(f"Error in moon emoji calculation! Phase: {phase}")
|
|
322
|
+
|
|
323
|
+
return result
|
|
324
|
+
|
|
325
|
+
def get_moon_phase_name_from_phase_int(phase: int) -> LunarPhaseName:
|
|
326
|
+
"""
|
|
327
|
+
Returns the name of the moon phase.
|
|
328
|
+
|
|
329
|
+
Args:
|
|
330
|
+
- phase: The phase of the moon (0-28)
|
|
331
|
+
|
|
332
|
+
Returns:
|
|
333
|
+
- The name of the moon phase
|
|
334
|
+
"""
|
|
335
|
+
|
|
336
|
+
if phase == 1:
|
|
337
|
+
result = "New Moon"
|
|
338
|
+
elif phase < 7:
|
|
339
|
+
result = "Waxing Crescent"
|
|
340
|
+
elif 7 <= phase <= 9:
|
|
341
|
+
result = "First Quarter"
|
|
342
|
+
elif phase < 14:
|
|
343
|
+
result = "Waxing Gibbous"
|
|
344
|
+
elif phase == 14:
|
|
345
|
+
result = "Full Moon"
|
|
346
|
+
elif phase < 20:
|
|
347
|
+
result = "Waning Gibbous"
|
|
348
|
+
elif 20 <= phase <= 22:
|
|
349
|
+
result = "Last Quarter"
|
|
350
|
+
elif phase <= 28:
|
|
351
|
+
result = "Waning Crescent"
|
|
352
|
+
|
|
353
|
+
else:
|
|
354
|
+
raise KerykeionException(f"Error in moon name calculation! Phase: {phase}")
|
|
355
|
+
|
|
356
|
+
return result
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
def check_and_adjust_polar_latitude(latitude: float, longitude: float) -> bool:
|
|
360
|
+
"""
|
|
361
|
+
Utility function to check if the location is in the polar circle.
|
|
362
|
+
If it is, it sets the latitude to 66 or -66 degrees.
|
|
363
|
+
"""
|
|
364
|
+
if latitude > 66.0:
|
|
365
|
+
latitude = 66.0
|
|
366
|
+
logging.info("Polar circle override for houses, using 66 degrees")
|
|
367
|
+
|
|
368
|
+
elif latitude < -66.0:
|
|
369
|
+
latitude = -66.0
|
|
370
|
+
logging.info("Polar circle override for houses, using -66 degrees")
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: kerykeion
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.12.3
|
|
4
4
|
Summary: A python library for astrology.
|
|
5
|
-
Home-page: https://
|
|
5
|
+
Home-page: https://www.kerykeion.net/
|
|
6
6
|
License: AGPL-3.0
|
|
7
7
|
Keywords: astrology,ephemeris,astrology library,birtchart,svg,zodiac,zodiac-sing,astronomical-algorithms,synastry,astrology-calculator
|
|
8
8
|
Author: Giacomo Battaglia
|
|
@@ -18,17 +18,19 @@ Classifier: Programming Language :: Python :: 3
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.9
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
22
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
23
|
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
23
24
|
Classifier: Topic :: Software Development
|
|
24
25
|
Classifier: Topic :: Software Development :: Libraries
|
|
25
26
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
26
27
|
Classifier: Typing :: Typed
|
|
27
|
-
Requires-Dist: pydantic (>=
|
|
28
|
+
Requires-Dist: pydantic (>=2.5,<3.0)
|
|
28
29
|
Requires-Dist: pyswisseph (>=2.10.3.1,<3.0.0.0)
|
|
29
30
|
Requires-Dist: pytz (>=2022.7,<2023.0)
|
|
30
|
-
Requires-Dist: requests (>=2.
|
|
31
|
-
Requires-Dist: requests-cache (>=
|
|
31
|
+
Requires-Dist: requests (>=2.32.3,<3.0.0)
|
|
32
|
+
Requires-Dist: requests-cache (>=1.2.1,<2.0.0)
|
|
33
|
+
Requires-Dist: scour (>=0.38.2,<0.39.0)
|
|
32
34
|
Requires-Dist: terminaltables (>=3.1.10,<4.0.0)
|
|
33
35
|
Project-URL: Repository, https://github.com/g-battaglia/kerykeion
|
|
34
36
|
Description-Content-Type: text/markdown
|
|
@@ -46,7 +48,7 @@ Description-Content-Type: text/markdown
|
|
|
46
48
|
</a>
|
|
47
49
|
<a href="https://pypi.org/project/kerykeion" target="_blank">
|
|
48
50
|
<img src="https://visitor-badge.laobi.icu/badge?page_id=g-battaglia.kerykeion" alt="visitors"/>
|
|
49
|
-
</a>
|
|
51
|
+
</a>
|
|
50
52
|
<a href="https://pypi.org/project/kerykeion" target="_blank">
|
|
51
53
|
<img src="https://img.shields.io/pypi/v/kerykeion?label=pypi%20package" alt="Package version">
|
|
52
54
|
</a>
|
|
@@ -63,14 +65,17 @@ also it can calculate the aspects of a single persone or between two, you can se
|
|
|
63
65
|
need in the settings in the utility module.
|
|
64
66
|
It also can generate an SVG of a birthchart, a synastry chart or a transit chart.
|
|
65
67
|
|
|
68
|
+
The core goal of this project is to provide a simple and easy approach to astrology in a data driven way.
|
|
69
|
+
|
|
66
70
|
Here's an example of a birthchart:
|
|
67
|
-
|
|
71
|
+
|
|
72
|
+

|
|
68
73
|
|
|
69
74
|
## Web API
|
|
70
75
|
|
|
71
76
|
If you want to use Kerykeion in a web application, I've created a web API for this purpose, you can find it here:
|
|
72
77
|
|
|
73
|
-
**[AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/)**
|
|
78
|
+
**[AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/pricing)**
|
|
74
79
|
|
|
75
80
|
It's [open source](https://github.com/g-battaglia/Astrologer-API), it's a way to support me and the project.
|
|
76
81
|
|
|
@@ -90,9 +95,11 @@ Kerykeion is a _Python 3.9_ package, make sure you have _Python 3.9_ or above in
|
|
|
90
95
|
pip3 install kerykeion
|
|
91
96
|
```
|
|
92
97
|
|
|
93
|
-
## Usage
|
|
98
|
+
## Basic Usage
|
|
99
|
+
|
|
100
|
+
The basic usage of the library is to create an instance of the AstrologicalSubject class and then access the properties of the instance to get the astrological information about the subject.
|
|
94
101
|
|
|
95
|
-
Here
|
|
102
|
+
Here's an example:
|
|
96
103
|
|
|
97
104
|
```python
|
|
98
105
|
|
|
@@ -100,8 +107,8 @@ Here some examples:
|
|
|
100
107
|
from kerykeion import AstrologicalSubject
|
|
101
108
|
|
|
102
109
|
# Create a kerykeion instance:
|
|
103
|
-
# Args: Name, year, month, day, hour, minuts, city, nation
|
|
104
|
-
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta")
|
|
110
|
+
# Args: Name, year, month, day, hour, minuts, city, nation
|
|
111
|
+
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
|
|
105
112
|
|
|
106
113
|
# Get the information about the sun in the chart:
|
|
107
114
|
# (The position of the planets always starts at 0)
|
|
@@ -132,38 +139,68 @@ kanye = AstrologicalSubject(
|
|
|
132
139
|
The difference is that you have to pass the longitude, latitude and the timezone string, instead of the city and nation.
|
|
133
140
|
If you omit the nation, it will be set to "GB" by default, but the value is not used for calculations. It's better to set it to the correct value though.
|
|
134
141
|
|
|
135
|
-
## Generate a SVG Chart
|
|
142
|
+
## Generate a SVG Chart
|
|
143
|
+
|
|
144
|
+
### Birth Chart
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
from kerykeion import AstrologicalSubject, KerykeionChartSVG
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
birth_chart = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
|
|
151
|
+
birth_chart_svg = KerykeionChartSVG(birth_chart)
|
|
152
|
+
|
|
153
|
+
birth_chart_svg.makeSVG()
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The SVG file will be saved in the home directory.
|
|
157
|
+

|
|
158
|
+
|
|
159
|
+
### Synastry Chart
|
|
136
160
|
|
|
137
161
|
```python
|
|
138
162
|
from kerykeion import AstrologicalSubject, KerykeionChartSVG
|
|
139
163
|
|
|
140
|
-
first = AstrologicalSubject("
|
|
141
|
-
second = AstrologicalSubject("
|
|
164
|
+
first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
165
|
+
second = AstrologicalSubject("Paul McCartney", 1942, 6, 18, 15, 30, "Liverpool", "GB")
|
|
142
166
|
|
|
143
167
|
# Set the type, it can be Natal, Synastry or Transit
|
|
168
|
+
synastry_chart = KerykeionChartSVG(first, "Synastry", second)
|
|
169
|
+
synastry_chart.makeSVG()
|
|
144
170
|
|
|
145
|
-
|
|
146
|
-
name.makeSVG()
|
|
147
|
-
print(len(name.aspects_list))
|
|
171
|
+
```
|
|
148
172
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
173
|
+

|
|
174
|
+
|
|
175
|
+
### Change the output directory
|
|
176
|
+
|
|
177
|
+
By default the output directory is the home directory, you can change it by passing the new_output_directory parameter to the KerykeionChartSVG class:
|
|
178
|
+
|
|
179
|
+
```python
|
|
180
|
+
from kerykeion import AstrologicalSubject, KerykeionChartSVG
|
|
154
181
|
|
|
182
|
+
first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
183
|
+
second = AstrologicalSubject("Paul McCartney", 1942, 6, 18, 15, 30, "Liverpool", "GB")
|
|
184
|
+
|
|
185
|
+
# Set the output directory to the current directory
|
|
186
|
+
synastry_chart = KerykeionChartSVG(first, "Synastry", second, new_output_directory=".")
|
|
187
|
+
synastry_chart.makeSVG()
|
|
155
188
|
```
|
|
156
189
|
|
|
157
|
-
|
|
190
|
+
### Change Language
|
|
191
|
+
|
|
192
|
+
To change the language of the chart you should create a new kr.config.js file and pass it to the BirthChartSVG class. So far the available languages are English, Portuguese, Italian, Spanish, French and Chinese.
|
|
158
193
|
|
|
159
|
-
|
|
194
|
+
Some examples [here](https://www.kerykeion.net/docs/examples/change-language).
|
|
195
|
+
|
|
196
|
+
## Report
|
|
160
197
|
|
|
161
198
|
To print a report of all the data:
|
|
162
199
|
|
|
163
200
|
```python
|
|
164
201
|
from kerykeion import Report, AstrologicalSubject
|
|
165
202
|
|
|
166
|
-
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta")
|
|
203
|
+
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
|
|
167
204
|
report = Report(kanye)
|
|
168
205
|
report.print_report()
|
|
169
206
|
|
|
@@ -171,7 +208,7 @@ report.print_report()
|
|
|
171
208
|
|
|
172
209
|
Returns:
|
|
173
210
|
|
|
174
|
-
```
|
|
211
|
+
```txt
|
|
175
212
|
+- Kerykeion report for Kanye -+
|
|
176
213
|
+----------+------+-------------+-----------+----------+
|
|
177
214
|
| Date | Time | Location | Longitude | Latitude |
|
|
@@ -217,17 +254,17 @@ Returns:
|
|
|
217
254
|
And if you want to export it to a file:
|
|
218
255
|
|
|
219
256
|
```bash
|
|
220
|
-
|
|
257
|
+
python3 your_script_name.py > file.txt
|
|
221
258
|
```
|
|
222
259
|
|
|
223
|
-
## Other
|
|
260
|
+
## Other examples of possible use cases:
|
|
224
261
|
|
|
225
262
|
```python
|
|
226
263
|
# Get all aspects between two persons:
|
|
227
264
|
|
|
228
265
|
from kerykeion import SynastryAspects, AstrologicalSubject
|
|
229
|
-
first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma")
|
|
230
|
-
second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma")
|
|
266
|
+
first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma", "IT")
|
|
267
|
+
second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma", "IT")
|
|
231
268
|
|
|
232
269
|
name = SynastryAspects(first, second)
|
|
233
270
|
aspect_list = name.get_relevant_aspects()
|
|
@@ -239,10 +276,74 @@ print(aspect_list[0])
|
|
|
239
276
|
|
|
240
277
|
```
|
|
241
278
|
|
|
279
|
+
## Ayanamsa (Sidereal Modes)
|
|
280
|
+
|
|
281
|
+
By default, the zodiac type is set to Tropic (Tropical).
|
|
282
|
+
You can set the zodiac type to Sidereal and the sidereal mode in the AstrologicalSubject class:
|
|
283
|
+
|
|
284
|
+
```python
|
|
285
|
+
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
More examples [here](https://www.kerykeion.net/docs/examples/sidereal-modes/).
|
|
289
|
+
|
|
290
|
+
Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#SiderealMode).
|
|
291
|
+
|
|
292
|
+
## Houses Systems
|
|
293
|
+
|
|
294
|
+
By default, the houses system is set to Placidus.
|
|
295
|
+
You can set the houses system in the AstrologicalSubject class:
|
|
296
|
+
|
|
297
|
+
```python
|
|
298
|
+
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", houses_system="M")
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
More examples [here](https://www.kerykeion.net/docs/examples/houses-systems/).
|
|
302
|
+
|
|
303
|
+
Full list of supported house systems [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#HousesSystem).
|
|
304
|
+
|
|
305
|
+
So far all the available houses system in the Swiss Ephemeris are supported but the Gauquelin Sectors.
|
|
306
|
+
|
|
307
|
+
## Perspective Type
|
|
308
|
+
|
|
309
|
+
By default, the perspective type is set to Apparent Geocentric (the most common standard for astrology).
|
|
310
|
+
The perspective indicates the point of view from which the chart is calculated (Es. Apparent Geocentric, Heliocentric, etc.).
|
|
311
|
+
You can set the perspective type in the AstrologicalSubject class:
|
|
312
|
+
|
|
313
|
+
```python
|
|
314
|
+
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", perspective_type="Heliocentric")
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
More examples [here](https://www.kerykeion.net/docs/examples/perspective-type/).
|
|
318
|
+
|
|
319
|
+
Full list of supported perspective types [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#PerspectiveType).
|
|
320
|
+
|
|
321
|
+
## Alternative Initialization
|
|
322
|
+
|
|
323
|
+
You can initialize the AstrologicalSubject from a **UTC** ISO 8601 string:
|
|
324
|
+
|
|
325
|
+
```python
|
|
326
|
+
subject = AstrologicalSubject.get_from_iso_utc_time(
|
|
327
|
+
"Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US")
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Note : The default time zone is UTC, with Greenwich longitude and latitude.
|
|
331
|
+
|
|
332
|
+
The default online/offline mode is set to offline, if you set it online the default latitude and longitude will be ignored and
|
|
333
|
+
calculated from the city and nation. Remember to pass also the geonames_username parameter if you want to use the online mode, like this:
|
|
334
|
+
|
|
335
|
+
```python
|
|
336
|
+
from kerykeion.astrological_subject import AstrologicalSubject
|
|
337
|
+
|
|
338
|
+
# Use the static method get_from_iso_utc_time to create an instance of AstrologicalSubject
|
|
339
|
+
subject = AstrologicalSubject.get_from_iso_utc_time(
|
|
340
|
+
"Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US", online=True)
|
|
341
|
+
```
|
|
342
|
+
|
|
242
343
|
## Documentation
|
|
243
344
|
|
|
244
345
|
Most of the functions and the classes are self documented by the types and have docstrings.
|
|
245
|
-
An auto-generated documentation [is available here](https://
|
|
346
|
+
An auto-generated documentation [is available here](https://www.kerykeion.net/pydocs/kerykeion.html).
|
|
246
347
|
|
|
247
348
|
Sooner or later I'll try to write an extensive documentation.
|
|
248
349
|
|
|
@@ -254,3 +355,12 @@ You can clone this repository or download a zip file using the right side button
|
|
|
254
355
|
|
|
255
356
|
Feel free to contribute to the code!
|
|
256
357
|
|
|
358
|
+
## License
|
|
359
|
+
|
|
360
|
+
This project is licensed under the AGPL-3.0 License.
|
|
361
|
+
To understand how this impacts your use of the software, please see the [LICENSE](LICENSE) file for details.
|
|
362
|
+
If you have questions, you can reach out to me at my [email](mailto:battaglia.giacomo@yahoo.it?subject=Kerykeion) address.
|
|
363
|
+
As a rule of thumb, if you are using this library in a project, you should open source the code of the project with a compatible license.
|
|
364
|
+
|
|
365
|
+
You can implement the logic of kerykeion in your project and also keep it closed source by using a third party API, like the [AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/). The AstrologerAPI is AGPL-3.0 compliant. Subscribing to the API is also, currently, the best way to support the project.
|
|
366
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
|
|
2
|
+
kerykeion/__init__.py,sha256=AOTx2pvk1-SByVSen5VW4QHsN5LTIjNxpHOIjlm8XA4,487
|
|
3
|
+
kerykeion/aspects/__init__.py,sha256=9FlDVI1ndCJga0-chNIhcLitjU_x3kbtAFfFqVp2ejc,293
|
|
4
|
+
kerykeion/aspects/aspects_utils.py,sha256=ZCOnhgW6CZQrCruAGaf8vkUlBtjubbfKOqXy6qyQupE,5321
|
|
5
|
+
kerykeion/aspects/natal_aspects.py,sha256=R47UToYKqbVrRmGzmY4pgsikcoXNmJvs5KhSmz7HZtM,4460
|
|
6
|
+
kerykeion/aspects/synastry_aspects.py,sha256=BqG0E4tDZJjPQm3NTX3G6LkTuijP0AsKtI9pwH0F_Mc,3946
|
|
7
|
+
kerykeion/astrological_subject.py,sha256=skJW8Xey_cyews-3CRusO_9jDTKTiOFOIWoeX5t0hHA,32781
|
|
8
|
+
kerykeion/charts/__init__.py,sha256=Juxkduy2TaagWblh_7CE8Acrg3dHL27-WEddJhau_eQ,127
|
|
9
|
+
kerykeion/charts/charts_utils.py,sha256=Pfy-SkPnABIy5ZkKgypnGqxXOAKhTRIeQX3fQKO8DgQ,15065
|
|
10
|
+
kerykeion/charts/kerykeion_chart_svg.py,sha256=P3xRWedqdbYjeI1xX9saL729IXBfJ_8TWLz1AzUF5vI,64864
|
|
11
|
+
kerykeion/charts/templates/chart.xml,sha256=aP_dVC2w2sULBtGrjrOUi46e5m59zKaMizMnTq1VfNM,67714
|
|
12
|
+
kerykeion/enums.py,sha256=Ben9GLYkPucpYY2ZDpURzUbNCc9jzK2MuaffkgiXFdQ,965
|
|
13
|
+
kerykeion/fetch_geonames.py,sha256=ZWB1DbcH54ab3fQhzPhLY0Dz0OaPJqiHFn2e7DRr1MM,4588
|
|
14
|
+
kerykeion/kr_types/__init__.py,sha256=-qhGQikurdoHnGtuT1bsaEeZ-IwmZtIHMjGOPC9_oqQ,295
|
|
15
|
+
kerykeion/kr_types/chart_types.py,sha256=qaZjm1rMpDDnUZlLjEihd9KPyv3PvrV8vkRmNBuRZzE,2201
|
|
16
|
+
kerykeion/kr_types/kerykeion_exception.py,sha256=G-7VFta78qBt10l54JZWvwH-3lUNKmDwuILXaVGVu9A,314
|
|
17
|
+
kerykeion/kr_types/kr_literals.py,sha256=Urk4wbRXeCOMhJEIkfvwTWrbU-Z5csDnh03hVwxpMbc,3140
|
|
18
|
+
kerykeion/kr_types/kr_models.py,sha256=eZU3CYFjK2f2JvwNneUUHrBVPmS55u6PMywHv1VD9LA,3524
|
|
19
|
+
kerykeion/kr_types/settings_models.py,sha256=Gh467QjvlGmheD6eJI1IHpuK4cz_hbtjGTJT_1NMoAE,12376
|
|
20
|
+
kerykeion/relationship_score.py,sha256=R9JugfK5_gJgr5ND-EghkqpqZcutzzKlJ-2JnYUMVv4,6794
|
|
21
|
+
kerykeion/report.py,sha256=kS5avIN119pJVapYjZOvabg77nEcA8sSrOuXbRifABk,2565
|
|
22
|
+
kerykeion/settings/__init__.py,sha256=QQNFCl7sgN27MKaVscqtpPk10HGz4wZS3I_7KEGMaVA,69
|
|
23
|
+
kerykeion/settings/kerykeion_settings.py,sha256=uRAbhJ0ZXAbGBPGJjhh5u8YX2phcXobEwJA646wMHcM,2347
|
|
24
|
+
kerykeion/settings/kr.config.json,sha256=1Yhv9RGHom5U9e-JZZRWVfT2Ubllz2WrckdwadDWfyg,12282
|
|
25
|
+
kerykeion/sweph/README.md,sha256=L7FtNAJTWtrZNGKa8MX87SjduFYPYxwWhaI5fmtzNZo,73
|
|
26
|
+
kerykeion/sweph/seas_18.se1,sha256=X9nCqhZU43wJpq61WAdueVQJt9xL2UjrwPqn1Kdoa1s,223002
|
|
27
|
+
kerykeion/utilities.py,sha256=1GxV7Du2L9QZEwNKc0oDjNsEddpAFCqY_kyWx38IRiA,11392
|
|
28
|
+
kerykeion-4.12.3.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
|
|
29
|
+
kerykeion-4.12.3.dist-info/METADATA,sha256=8W1pRQlQ5UwY81Ukt1l4ICIGdQqMZRmWl5zVyLgj7ao,14410
|
|
30
|
+
kerykeion-4.12.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
31
|
+
kerykeion-4.12.3.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
|
|
32
|
+
kerykeion-4.12.3.dist-info/RECORD,,
|
kerykeion-4.0.6.dist-info/RECORD
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
|
|
2
|
-
kerykeion/__init__.py,sha256=b01JNmaaRWjA9seRjAA59Cduy1dNVJ0iU2oUFw5qZiw,3885
|
|
3
|
-
kerykeion/aspects/__init__.py,sha256=KAGLkC41PRsRqiV6Ii38HIME-rfTrefiKOOzC5d7Ub0,292
|
|
4
|
-
kerykeion/aspects/natal_aspects.py,sha256=W5AhNGAXqaBmhQOJghxqYWbETT3NHXLpGdDfqe1gj9E,10436
|
|
5
|
-
kerykeion/aspects/synastry_aspects.py,sha256=DBEV-gT5gRuN8Rl6YNamjkvGQMvjehKL8qgTo75O9XI,2862
|
|
6
|
-
kerykeion/astrological_subject.py,sha256=cIZiPnuNYSiSOOEAdOiSqxQbJXKDa-8jV8T7oDfRDe0,21222
|
|
7
|
-
kerykeion/charts/__init__.py,sha256=3WzR2n9dr6MDzjTbEQOYpXSFlhfMfga5YWNsPawdbRw,127
|
|
8
|
-
kerykeion/charts/charts_utils.py,sha256=qQMXu5XZCCjvyqL62fzh4JnKLzd_G6u9pcMk6f1DpIc,3197
|
|
9
|
-
kerykeion/charts/kerykeion_chart_svg.py,sha256=3_TImLrD5bbQssYxSzpRrWcsoeDNd3BIwfS8ZGmotrM,66361
|
|
10
|
-
kerykeion/charts/templates/chart.xml,sha256=ZrkqJV3Du8vG1w8kVkM1wI-IiZNVDLDuS6dRtPz7wVo,69874
|
|
11
|
-
kerykeion/fetch_geonames.py,sha256=6tgjrwBMyjbA6YNZ4rcESyYSn0FDyi1xL2gkFuy9o6k,4774
|
|
12
|
-
kerykeion/kr_types/__init__.py,sha256=xlBzpRwcKTamjYOYxCTf-BGAX5NODBQB3zqBP_sH28o,104
|
|
13
|
-
kerykeion/kr_types/chart_types.py,sha256=0grG4IdOd6fYbon5ErBy0xYxB66Ajfsl9o1F4ISPtck,2184
|
|
14
|
-
kerykeion/kr_types/kerykeion_exception.py,sha256=CtdpOaGTox_LBGB0Ji_qtcwbgYAqBJ8AfDXbeaiAkM0,314
|
|
15
|
-
kerykeion/kr_types/kr_literals.py,sha256=hbgeq5yPuyLv9zXp7shBeEsMHOd8UQBBUa_HQnBQu7w,1034
|
|
16
|
-
kerykeion/kr_types/kr_models.py,sha256=pnUwYC3EqxPN3brmWjBUqYT_9Blxcqc--VqUoi6wfOs,3971
|
|
17
|
-
kerykeion/relationship_score.py,sha256=bzM97kFjjDbc-grXhWG2PDkodu6dAFYZis3bO7qaR-A,6916
|
|
18
|
-
kerykeion/report.py,sha256=se2ZSDKjk2v2eaMWqBFaYPhcqyGP-RlQbr6uA-9-Mz0,2481
|
|
19
|
-
kerykeion/settings/__init__.py,sha256=adj8WE0Svgce770ZAhF0B4BhH4liQfTkPDQC6aL39a8,74
|
|
20
|
-
kerykeion/settings/kerykeion_settings.py,sha256=qISpiOvGIphvAKxyqUu0vZZ1TeoXd9hrpLHK3TDSkfA,14851
|
|
21
|
-
kerykeion/settings/kr.config.json,sha256=YBK33bkcIhB2WEc-PEXJuU12nGR30fK1NNz2TT8BpPo,12283
|
|
22
|
-
kerykeion/sweph/README.md,sha256=L7FtNAJTWtrZNGKa8MX87SjduFYPYxwWhaI5fmtzNZo,73
|
|
23
|
-
kerykeion/sweph/seas_18.se1,sha256=X9nCqhZU43wJpq61WAdueVQJt9xL2UjrwPqn1Kdoa1s,223002
|
|
24
|
-
kerykeion/utilities.py,sha256=l2IuKGP687USF5uzRHJFrNmvzHMSFzZEWliWSIHUjlU,5707
|
|
25
|
-
kerykeion-4.0.6.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
|
|
26
|
-
kerykeion-4.0.6.dist-info/METADATA,sha256=DeIbQf-vzNIzzh_3-t-Xbi69kUlq-naVhrCrVk2g5to,9409
|
|
27
|
-
kerykeion-4.0.6.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
28
|
-
kerykeion-4.0.6.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
|
|
29
|
-
kerykeion-4.0.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|