kerykeion 4.8.1__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 +2 -95
- kerykeion/aspects/aspects_utils.py +0 -12
- kerykeion/aspects/natal_aspects.py +1 -2
- kerykeion/aspects/synastry_aspects.py +3 -4
- kerykeion/astrological_subject.py +316 -123
- kerykeion/charts/charts_utils.py +1 -1
- kerykeion/charts/kerykeion_chart_svg.py +83 -22
- kerykeion/charts/templates/chart.xml +360 -355
- kerykeion/kr_types/chart_types.py +1 -0
- kerykeion/kr_types/kr_literals.py +87 -54
- kerykeion/kr_types/kr_models.py +35 -77
- kerykeion/kr_types/settings_models.py +10 -27
- kerykeion/utilities.py +36 -23
- {kerykeion-4.8.1.dist-info → kerykeion-4.12.3.dist-info}/METADATA +128 -32
- kerykeion-4.12.3.dist-info/RECORD +32 -0
- kerykeion-4.8.1.dist-info/RECORD +0 -32
- {kerykeion-4.8.1.dist-info → kerykeion-4.12.3.dist-info}/LICENSE +0 -0
- {kerykeion-4.8.1.dist-info → kerykeion-4.12.3.dist-info}/WHEEL +0 -0
- {kerykeion-4.8.1.dist-info → kerykeion-4.12.3.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
|
|
@@ -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
|
|
|
@@ -150,7 +139,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
150
139
|
name,
|
|
151
140
|
distance - aspect_degrees,
|
|
152
141
|
aspect_degrees,
|
|
153
|
-
color,
|
|
154
142
|
aid,
|
|
155
143
|
diff,
|
|
156
144
|
)
|
|
@@ -52,7 +52,7 @@ 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
|
-
verdict, name, orbit, aspect_degrees,
|
|
55
|
+
verdict, name, orbit, aspect_degrees, aid, diff = 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
|
|
|
@@ -65,7 +65,6 @@ class NatalAspects:
|
|
|
65
65
|
"aspect": name,
|
|
66
66
|
"orbit": orbit,
|
|
67
67
|
"aspect_degrees": aspect_degrees,
|
|
68
|
-
"color": color,
|
|
69
68
|
"aid": aid,
|
|
70
69
|
"diff": diff,
|
|
71
70
|
"p1": planet_id_decoder(self.celestial_points, active_points_list[first]["name"]),
|
|
@@ -60,7 +60,7 @@ 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
|
-
verdict, name, orbit, aspect_degrees,
|
|
63
|
+
verdict, name, orbit, aspect_degrees, aid, diff = 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"],
|
|
@@ -75,7 +75,6 @@ class SynastryAspects(NatalAspects):
|
|
|
75
75
|
"aspect": name,
|
|
76
76
|
"orbit": orbit,
|
|
77
77
|
"aspect_degrees": aspect_degrees,
|
|
78
|
-
"color": color,
|
|
79
78
|
"aid": aid,
|
|
80
79
|
"diff": diff,
|
|
81
80
|
"p1": planet_id_decoder(
|
|
@@ -96,8 +95,8 @@ if __name__ == "__main__":
|
|
|
96
95
|
from kerykeion.utilities import setup_logging
|
|
97
96
|
setup_logging(level="debug")
|
|
98
97
|
|
|
99
|
-
john = AstrologicalSubject("John", 1940, 10, 9,
|
|
100
|
-
yoko = AstrologicalSubject("Yoko", 1933, 2, 18,
|
|
98
|
+
john = AstrologicalSubject("John", 1940, 10, 9, 18, 30, "Liverpool")
|
|
99
|
+
yoko = AstrologicalSubject("Yoko", 1933, 2, 18, 18, 30, "Tokyo")
|
|
101
100
|
|
|
102
101
|
synastry_aspects = SynastryAspects(john, yoko)
|
|
103
102
|
|