kerykeion 4.11.0__tar.gz → 4.15.0__tar.gz
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-4.11.0 → kerykeion-4.15.0}/PKG-INFO +95 -25
- {kerykeion-4.11.0 → kerykeion-4.15.0}/README.md +93 -23
- kerykeion-4.15.0/kerykeion/__init__.py +17 -0
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/aspects/aspects_utils.py +12 -22
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/aspects/natal_aspects.py +11 -3
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/aspects/synastry_aspects.py +15 -6
- kerykeion-4.15.0/kerykeion/astrological_subject.py +814 -0
- kerykeion-4.15.0/kerykeion/charts/charts_utils.py +998 -0
- kerykeion-4.15.0/kerykeion/charts/color_style_tags.py +86 -0
- kerykeion-4.15.0/kerykeion/charts/draw_planets.py +407 -0
- kerykeion-4.15.0/kerykeion/charts/kerykeion_chart_svg.py +665 -0
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/charts/templates/chart.xml +91 -76
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/enums.py +1 -0
- kerykeion-4.15.0/kerykeion/ephemeris_data.py +178 -0
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/fetch_geonames.py +2 -3
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/kr_types/chart_types.py +6 -16
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/kr_types/kr_literals.py +18 -3
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/kr_types/kr_models.py +60 -22
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/kr_types/settings_models.py +10 -4
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/relationship_score.py +5 -4
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/report.py +6 -3
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/settings/kr.config.json +85 -71
- kerykeion-4.15.0/kerykeion/utilities.py +272 -0
- {kerykeion-4.11.0 → kerykeion-4.15.0}/pyproject.toml +2 -2
- kerykeion-4.11.0/kerykeion/__init__.py +0 -257
- kerykeion-4.11.0/kerykeion/astrological_subject.py +0 -669
- kerykeion-4.11.0/kerykeion/charts/charts_utils.py +0 -444
- kerykeion-4.11.0/kerykeion/charts/kerykeion_chart_svg.py +0 -1473
- kerykeion-4.11.0/kerykeion/utilities.py +0 -356
- {kerykeion-4.11.0 → kerykeion-4.15.0}/LICENSE +0 -0
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/aspects/__init__.py +0 -0
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/charts/__init__.py +0 -0
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/kr_types/__init__.py +0 -0
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/kr_types/kerykeion_exception.py +0 -0
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/settings/__init__.py +0 -0
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/settings/kerykeion_settings.py +0 -0
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/sweph/README.md +0 -0
- {kerykeion-4.11.0 → kerykeion-4.15.0}/kerykeion/sweph/seas_18.se1 +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: kerykeion
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.15.0
|
|
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
|
|
@@ -69,13 +69,13 @@ The core goal of this project is to provide a simple and easy approach to astrol
|
|
|
69
69
|
|
|
70
70
|
Here's an example of a birthchart:
|
|
71
71
|
|
|
72
|
-

|
|
73
73
|
|
|
74
74
|
## Web API
|
|
75
75
|
|
|
76
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:
|
|
77
77
|
|
|
78
|
-
**[AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/)**
|
|
78
|
+
**[AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/pricing)**
|
|
79
79
|
|
|
80
80
|
It's [open source](https://github.com/g-battaglia/Astrologer-API), it's a way to support me and the project.
|
|
81
81
|
|
|
@@ -95,9 +95,11 @@ Kerykeion is a _Python 3.9_ package, make sure you have _Python 3.9_ or above in
|
|
|
95
95
|
pip3 install kerykeion
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
## Usage
|
|
98
|
+
## Basic Usage
|
|
99
99
|
|
|
100
|
-
|
|
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.
|
|
101
|
+
|
|
102
|
+
Here's an example:
|
|
101
103
|
|
|
102
104
|
```python
|
|
103
105
|
|
|
@@ -105,8 +107,8 @@ Here some examples:
|
|
|
105
107
|
from kerykeion import AstrologicalSubject
|
|
106
108
|
|
|
107
109
|
# Create a kerykeion instance:
|
|
108
|
-
# Args: Name, year, month, day, hour, minuts, city, nation
|
|
109
|
-
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")
|
|
110
112
|
|
|
111
113
|
# Get the information about the sun in the chart:
|
|
112
114
|
# (The position of the planets always starts at 0)
|
|
@@ -139,27 +141,57 @@ If you omit the nation, it will be set to "GB" by default, but the value is not
|
|
|
139
141
|
|
|
140
142
|
## Generate a SVG Chart
|
|
141
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
|
|
160
|
+
|
|
142
161
|
```python
|
|
143
162
|
from kerykeion import AstrologicalSubject, KerykeionChartSVG
|
|
144
163
|
|
|
145
|
-
first = AstrologicalSubject("
|
|
146
|
-
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")
|
|
147
166
|
|
|
148
167
|
# Set the type, it can be Natal, Synastry or Transit
|
|
168
|
+
synastry_chart = KerykeionChartSVG(first, "Synastry", second)
|
|
169
|
+
synastry_chart.makeSVG()
|
|
149
170
|
|
|
150
|
-
|
|
151
|
-
name.makeSVG()
|
|
152
|
-
print(len(name.aspects_list))
|
|
171
|
+
```
|
|
153
172
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
|
|
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")
|
|
159
184
|
|
|
185
|
+
# Set the output directory to the current directory
|
|
186
|
+
synastry_chart = KerykeionChartSVG(first, "Synastry", second, new_output_directory=".")
|
|
187
|
+
synastry_chart.makeSVG()
|
|
160
188
|
```
|
|
161
189
|
|
|
162
|
-
|
|
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.
|
|
193
|
+
|
|
194
|
+
Some examples [here](https://www.kerykeion.net/docs/examples/change-language).
|
|
163
195
|
|
|
164
196
|
## Report
|
|
165
197
|
|
|
@@ -168,7 +200,7 @@ To print a report of all the data:
|
|
|
168
200
|
```python
|
|
169
201
|
from kerykeion import Report, AstrologicalSubject
|
|
170
202
|
|
|
171
|
-
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta")
|
|
203
|
+
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
|
|
172
204
|
report = Report(kanye)
|
|
173
205
|
report.print_report()
|
|
174
206
|
|
|
@@ -225,14 +257,14 @@ And if you want to export it to a file:
|
|
|
225
257
|
python3 your_script_name.py > file.txt
|
|
226
258
|
```
|
|
227
259
|
|
|
228
|
-
## Other
|
|
260
|
+
## Other examples of possible use cases:
|
|
229
261
|
|
|
230
262
|
```python
|
|
231
263
|
# Get all aspects between two persons:
|
|
232
264
|
|
|
233
265
|
from kerykeion import SynastryAspects, AstrologicalSubject
|
|
234
|
-
first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma")
|
|
235
|
-
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")
|
|
236
268
|
|
|
237
269
|
name = SynastryAspects(first, second)
|
|
238
270
|
aspect_list = name.get_relevant_aspects()
|
|
@@ -246,7 +278,8 @@ print(aspect_list[0])
|
|
|
246
278
|
|
|
247
279
|
## Ayanamsa (Sidereal Modes)
|
|
248
280
|
|
|
249
|
-
|
|
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:
|
|
250
283
|
|
|
251
284
|
```python
|
|
252
285
|
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
|
|
@@ -258,18 +291,55 @@ Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/ke
|
|
|
258
291
|
|
|
259
292
|
## Houses Systems
|
|
260
293
|
|
|
294
|
+
By default, the houses system is set to Placidus.
|
|
261
295
|
You can set the houses system in the AstrologicalSubject class:
|
|
262
296
|
|
|
263
297
|
```python
|
|
264
298
|
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", houses_system="M")
|
|
265
299
|
```
|
|
266
300
|
|
|
267
|
-
More examples [here](https://www.kerykeion.net/docs/examples/
|
|
301
|
+
More examples [here](https://www.kerykeion.net/docs/examples/houses-systems/).
|
|
268
302
|
|
|
269
303
|
Full list of supported house systems [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#HousesSystem).
|
|
270
304
|
|
|
271
305
|
So far all the available houses system in the Swiss Ephemeris are supported but the Gauquelin Sectors.
|
|
272
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
|
+
|
|
273
343
|
## Documentation
|
|
274
344
|
|
|
275
345
|
Most of the functions and the classes are self documented by the types and have docstrings.
|
|
@@ -32,13 +32,13 @@ The core goal of this project is to provide a simple and easy approach to astrol
|
|
|
32
32
|
|
|
33
33
|
Here's an example of a birthchart:
|
|
34
34
|
|
|
35
|
-

|
|
36
36
|
|
|
37
37
|
## Web API
|
|
38
38
|
|
|
39
39
|
If you want to use Kerykeion in a web application, I've created a web API for this purpose, you can find it here:
|
|
40
40
|
|
|
41
|
-
**[AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/)**
|
|
41
|
+
**[AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/pricing)**
|
|
42
42
|
|
|
43
43
|
It's [open source](https://github.com/g-battaglia/Astrologer-API), it's a way to support me and the project.
|
|
44
44
|
|
|
@@ -58,9 +58,11 @@ Kerykeion is a _Python 3.9_ package, make sure you have _Python 3.9_ or above in
|
|
|
58
58
|
pip3 install kerykeion
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
## Usage
|
|
61
|
+
## Basic Usage
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
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.
|
|
64
|
+
|
|
65
|
+
Here's an example:
|
|
64
66
|
|
|
65
67
|
```python
|
|
66
68
|
|
|
@@ -68,8 +70,8 @@ Here some examples:
|
|
|
68
70
|
from kerykeion import AstrologicalSubject
|
|
69
71
|
|
|
70
72
|
# Create a kerykeion instance:
|
|
71
|
-
# Args: Name, year, month, day, hour, minuts, city, nation
|
|
72
|
-
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta")
|
|
73
|
+
# Args: Name, year, month, day, hour, minuts, city, nation
|
|
74
|
+
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
|
|
73
75
|
|
|
74
76
|
# Get the information about the sun in the chart:
|
|
75
77
|
# (The position of the planets always starts at 0)
|
|
@@ -102,27 +104,57 @@ If you omit the nation, it will be set to "GB" by default, but the value is not
|
|
|
102
104
|
|
|
103
105
|
## Generate a SVG Chart
|
|
104
106
|
|
|
107
|
+
### Birth Chart
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
from kerykeion import AstrologicalSubject, KerykeionChartSVG
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
birth_chart = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
|
|
114
|
+
birth_chart_svg = KerykeionChartSVG(birth_chart)
|
|
115
|
+
|
|
116
|
+
birth_chart_svg.makeSVG()
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The SVG file will be saved in the home directory.
|
|
120
|
+

|
|
121
|
+
|
|
122
|
+
### Synastry Chart
|
|
123
|
+
|
|
105
124
|
```python
|
|
106
125
|
from kerykeion import AstrologicalSubject, KerykeionChartSVG
|
|
107
126
|
|
|
108
|
-
first = AstrologicalSubject("
|
|
109
|
-
second = AstrologicalSubject("
|
|
127
|
+
first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
128
|
+
second = AstrologicalSubject("Paul McCartney", 1942, 6, 18, 15, 30, "Liverpool", "GB")
|
|
110
129
|
|
|
111
130
|
# Set the type, it can be Natal, Synastry or Transit
|
|
131
|
+
synastry_chart = KerykeionChartSVG(first, "Synastry", second)
|
|
132
|
+
synastry_chart.makeSVG()
|
|
112
133
|
|
|
113
|
-
|
|
114
|
-
name.makeSVG()
|
|
115
|
-
print(len(name.aspects_list))
|
|
134
|
+
```
|
|
116
135
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
136
|
+

|
|
137
|
+
|
|
138
|
+
### Change the output directory
|
|
139
|
+
|
|
140
|
+
By default the output directory is the home directory, you can change it by passing the new_output_directory parameter to the KerykeionChartSVG class:
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
from kerykeion import AstrologicalSubject, KerykeionChartSVG
|
|
144
|
+
|
|
145
|
+
first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
146
|
+
second = AstrologicalSubject("Paul McCartney", 1942, 6, 18, 15, 30, "Liverpool", "GB")
|
|
122
147
|
|
|
148
|
+
# Set the output directory to the current directory
|
|
149
|
+
synastry_chart = KerykeionChartSVG(first, "Synastry", second, new_output_directory=".")
|
|
150
|
+
synastry_chart.makeSVG()
|
|
123
151
|
```
|
|
124
152
|
|
|
125
|
-
|
|
153
|
+
### Change Language
|
|
154
|
+
|
|
155
|
+
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.
|
|
156
|
+
|
|
157
|
+
Some examples [here](https://www.kerykeion.net/docs/examples/change-language).
|
|
126
158
|
|
|
127
159
|
## Report
|
|
128
160
|
|
|
@@ -131,7 +163,7 @@ To print a report of all the data:
|
|
|
131
163
|
```python
|
|
132
164
|
from kerykeion import Report, AstrologicalSubject
|
|
133
165
|
|
|
134
|
-
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta")
|
|
166
|
+
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
|
|
135
167
|
report = Report(kanye)
|
|
136
168
|
report.print_report()
|
|
137
169
|
|
|
@@ -188,14 +220,14 @@ And if you want to export it to a file:
|
|
|
188
220
|
python3 your_script_name.py > file.txt
|
|
189
221
|
```
|
|
190
222
|
|
|
191
|
-
## Other
|
|
223
|
+
## Other examples of possible use cases:
|
|
192
224
|
|
|
193
225
|
```python
|
|
194
226
|
# Get all aspects between two persons:
|
|
195
227
|
|
|
196
228
|
from kerykeion import SynastryAspects, AstrologicalSubject
|
|
197
|
-
first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma")
|
|
198
|
-
second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma")
|
|
229
|
+
first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma", "IT")
|
|
230
|
+
second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma", "IT")
|
|
199
231
|
|
|
200
232
|
name = SynastryAspects(first, second)
|
|
201
233
|
aspect_list = name.get_relevant_aspects()
|
|
@@ -209,7 +241,8 @@ print(aspect_list[0])
|
|
|
209
241
|
|
|
210
242
|
## Ayanamsa (Sidereal Modes)
|
|
211
243
|
|
|
212
|
-
|
|
244
|
+
By default, the zodiac type is set to Tropic (Tropical).
|
|
245
|
+
You can set the zodiac type to Sidereal and the sidereal mode in the AstrologicalSubject class:
|
|
213
246
|
|
|
214
247
|
```python
|
|
215
248
|
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
|
|
@@ -221,18 +254,55 @@ Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/ke
|
|
|
221
254
|
|
|
222
255
|
## Houses Systems
|
|
223
256
|
|
|
257
|
+
By default, the houses system is set to Placidus.
|
|
224
258
|
You can set the houses system in the AstrologicalSubject class:
|
|
225
259
|
|
|
226
260
|
```python
|
|
227
261
|
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", houses_system="M")
|
|
228
262
|
```
|
|
229
263
|
|
|
230
|
-
More examples [here](https://www.kerykeion.net/docs/examples/
|
|
264
|
+
More examples [here](https://www.kerykeion.net/docs/examples/houses-systems/).
|
|
231
265
|
|
|
232
266
|
Full list of supported house systems [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#HousesSystem).
|
|
233
267
|
|
|
234
268
|
So far all the available houses system in the Swiss Ephemeris are supported but the Gauquelin Sectors.
|
|
235
269
|
|
|
270
|
+
## Perspective Type
|
|
271
|
+
|
|
272
|
+
By default, the perspective type is set to Apparent Geocentric (the most common standard for astrology).
|
|
273
|
+
The perspective indicates the point of view from which the chart is calculated (Es. Apparent Geocentric, Heliocentric, etc.).
|
|
274
|
+
You can set the perspective type in the AstrologicalSubject class:
|
|
275
|
+
|
|
276
|
+
```python
|
|
277
|
+
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", perspective_type="Heliocentric")
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
More examples [here](https://www.kerykeion.net/docs/examples/perspective-type/).
|
|
281
|
+
|
|
282
|
+
Full list of supported perspective types [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#PerspectiveType).
|
|
283
|
+
|
|
284
|
+
## Alternative Initialization
|
|
285
|
+
|
|
286
|
+
You can initialize the AstrologicalSubject from a **UTC** ISO 8601 string:
|
|
287
|
+
|
|
288
|
+
```python
|
|
289
|
+
subject = AstrologicalSubject.get_from_iso_utc_time(
|
|
290
|
+
"Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US")
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
Note : The default time zone is UTC, with Greenwich longitude and latitude.
|
|
294
|
+
|
|
295
|
+
The default online/offline mode is set to offline, if you set it online the default latitude and longitude will be ignored and
|
|
296
|
+
calculated from the city and nation. Remember to pass also the geonames_username parameter if you want to use the online mode, like this:
|
|
297
|
+
|
|
298
|
+
```python
|
|
299
|
+
from kerykeion.astrological_subject import AstrologicalSubject
|
|
300
|
+
|
|
301
|
+
# Use the static method get_from_iso_utc_time to create an instance of AstrologicalSubject
|
|
302
|
+
subject = AstrologicalSubject.get_from_iso_utc_time(
|
|
303
|
+
"Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US", online=True)
|
|
304
|
+
```
|
|
305
|
+
|
|
236
306
|
## Documentation
|
|
237
307
|
|
|
238
308
|
Most of the functions and the classes are self documented by the types and have docstrings.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
This is part of Kerykeion (C) 2024 Giacomo Battaglia
|
|
4
|
+
|
|
5
|
+
.. include:: ../README.md
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
# Local
|
|
9
|
+
from .astrological_subject import AstrologicalSubject
|
|
10
|
+
from .charts.kerykeion_chart_svg import KerykeionChartSVG
|
|
11
|
+
from .kr_types import *
|
|
12
|
+
from .relationship_score import RelationshipScore
|
|
13
|
+
from .aspects import SynastryAspects, NatalAspects
|
|
14
|
+
from .report import Report
|
|
15
|
+
from .settings import KerykeionSettingsModel, get_settings
|
|
16
|
+
from .enums import Planets, Aspects, Signs
|
|
17
|
+
from .ephemeris_data import EphemerisDataFactory
|
|
@@ -8,6 +8,7 @@ from kerykeion import AstrologicalSubject
|
|
|
8
8
|
from kerykeion.settings import KerykeionSettingsModel
|
|
9
9
|
from swisseph import difdeg2n
|
|
10
10
|
from typing import Union
|
|
11
|
+
from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, int], point_two: Union[float, int]):
|
|
@@ -23,7 +24,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
23
24
|
if int(distance) <= aspects_settings[0]["orb"]:
|
|
24
25
|
name = aspects_settings[0]["name"]
|
|
25
26
|
aspect_degrees = aspects_settings[0]["degree"]
|
|
26
|
-
color = aspects_settings[0]["color"]
|
|
27
27
|
verdict = True
|
|
28
28
|
aid = 0
|
|
29
29
|
|
|
@@ -34,7 +34,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
34
34
|
):
|
|
35
35
|
name = aspects_settings[1]["name"]
|
|
36
36
|
aspect_degrees = aspects_settings[1]["degree"]
|
|
37
|
-
color = aspects_settings[1]["color"]
|
|
38
37
|
verdict = True
|
|
39
38
|
aid = 1
|
|
40
39
|
|
|
@@ -45,7 +44,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
45
44
|
):
|
|
46
45
|
name = aspects_settings[2]["name"]
|
|
47
46
|
aspect_degrees = aspects_settings[2]["degree"]
|
|
48
|
-
color = aspects_settings[2]["color"]
|
|
49
47
|
verdict = True
|
|
50
48
|
aid = 2
|
|
51
49
|
|
|
@@ -56,7 +54,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
56
54
|
):
|
|
57
55
|
name = aspects_settings[3]["name"]
|
|
58
56
|
aspect_degrees = aspects_settings[3]["degree"]
|
|
59
|
-
color = aspects_settings[3]["color"]
|
|
60
57
|
verdict = True
|
|
61
58
|
aid = 3
|
|
62
59
|
|
|
@@ -67,7 +64,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
67
64
|
):
|
|
68
65
|
name = aspects_settings[4]["name"]
|
|
69
66
|
aspect_degrees = aspects_settings[4]["degree"]
|
|
70
|
-
color = aspects_settings[4]["color"]
|
|
71
67
|
verdict = True
|
|
72
68
|
aid = 4
|
|
73
69
|
|
|
@@ -78,7 +74,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
78
74
|
):
|
|
79
75
|
name = aspects_settings[5]["name"]
|
|
80
76
|
aspect_degrees = aspects_settings[5]["degree"]
|
|
81
|
-
color = aspects_settings[5]["color"]
|
|
82
77
|
verdict = True
|
|
83
78
|
aid = 5
|
|
84
79
|
|
|
@@ -89,7 +84,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
89
84
|
):
|
|
90
85
|
name = aspects_settings[6]["name"]
|
|
91
86
|
aspect_degrees = aspects_settings[6]["degree"]
|
|
92
|
-
color = aspects_settings[6]["color"]
|
|
93
87
|
verdict = True
|
|
94
88
|
aid = 6
|
|
95
89
|
|
|
@@ -100,7 +94,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
100
94
|
):
|
|
101
95
|
name = aspects_settings[7]["name"]
|
|
102
96
|
aspect_degrees = aspects_settings[7]["degree"]
|
|
103
|
-
color = aspects_settings[7]["color"]
|
|
104
97
|
verdict = True
|
|
105
98
|
aid = 7
|
|
106
99
|
|
|
@@ -111,7 +104,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
111
104
|
):
|
|
112
105
|
name = aspects_settings[8]["name"]
|
|
113
106
|
aspect_degrees = aspects_settings[8]["degree"]
|
|
114
|
-
color = aspects_settings[8]["color"]
|
|
115
107
|
verdict = True
|
|
116
108
|
aid = 8
|
|
117
109
|
|
|
@@ -122,7 +114,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
122
114
|
):
|
|
123
115
|
name = aspects_settings[9]["name"]
|
|
124
116
|
aspect_degrees = aspects_settings[9]["degree"]
|
|
125
|
-
color = aspects_settings[9]["color"]
|
|
126
117
|
verdict = True
|
|
127
118
|
aid = 9
|
|
128
119
|
|
|
@@ -133,7 +124,6 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
133
124
|
):
|
|
134
125
|
name = aspects_settings[10]["name"]
|
|
135
126
|
aspect_degrees = aspects_settings[10]["degree"]
|
|
136
|
-
color = aspects_settings[10]["color"]
|
|
137
127
|
verdict = True
|
|
138
128
|
aid = 10
|
|
139
129
|
|
|
@@ -142,18 +132,18 @@ def get_aspect_from_two_points(aspects_settings: dict, point_one: Union[float, i
|
|
|
142
132
|
name = None
|
|
143
133
|
distance = 0
|
|
144
134
|
aspect_degrees = 0
|
|
145
|
-
color = None
|
|
146
135
|
aid = None
|
|
147
136
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
aspect_degrees,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
"verdict": verdict,
|
|
140
|
+
"name": name,
|
|
141
|
+
"orbit": distance - aspect_degrees,
|
|
142
|
+
"distance": distance - aspect_degrees,
|
|
143
|
+
"aspect_degrees": aspect_degrees,
|
|
144
|
+
"aid": aid,
|
|
145
|
+
"diff": diff
|
|
146
|
+
}
|
|
157
147
|
|
|
158
148
|
|
|
159
149
|
def planet_id_decoder(planets_settings: dict, name: str):
|
|
@@ -168,7 +158,7 @@ def planet_id_decoder(planets_settings: dict, name: str):
|
|
|
168
158
|
return result
|
|
169
159
|
|
|
170
160
|
|
|
171
|
-
def get_active_points_list(subject: AstrologicalSubject, settings: Union[KerykeionSettingsModel, dict]) -> list:
|
|
161
|
+
def get_active_points_list(subject: Union[AstrologicalSubject, AstrologicalSubjectModel], settings: Union[KerykeionSettingsModel, dict]) -> list:
|
|
172
162
|
"""
|
|
173
163
|
Given an astrological subject and the settings, return a list of the active points.
|
|
174
164
|
Args:
|
|
@@ -11,6 +11,7 @@ from kerykeion.settings.kerykeion_settings import get_settings
|
|
|
11
11
|
from dataclasses import dataclass
|
|
12
12
|
from functools import cached_property
|
|
13
13
|
from kerykeion.aspects.aspects_utils import planet_id_decoder, get_aspect_from_two_points, get_active_points_list
|
|
14
|
+
from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
AXES_LIST = [
|
|
@@ -27,7 +28,7 @@ class NatalAspects:
|
|
|
27
28
|
Generates an object with all the aspects of a birthcart.
|
|
28
29
|
"""
|
|
29
30
|
|
|
30
|
-
user: AstrologicalSubject
|
|
31
|
+
user: Union[AstrologicalSubject, AstrologicalSubjectModel]
|
|
31
32
|
new_settings_file: Union[Path, None] = None
|
|
32
33
|
|
|
33
34
|
def __post_init__(self):
|
|
@@ -52,10 +53,18 @@ class NatalAspects:
|
|
|
52
53
|
for first in range(len(active_points_list)):
|
|
53
54
|
# Generates the aspects list without repetitions
|
|
54
55
|
for second in range(first + 1, len(active_points_list)):
|
|
55
|
-
|
|
56
|
+
aspect = get_aspect_from_two_points(
|
|
56
57
|
self.aspects_settings, active_points_list[first]["abs_pos"], active_points_list[second]["abs_pos"]
|
|
57
58
|
)
|
|
58
59
|
|
|
60
|
+
verdict = aspect["verdict"]
|
|
61
|
+
name = aspect["name"]
|
|
62
|
+
orbit = aspect["orbit"]
|
|
63
|
+
aspect_degrees = aspect["aspect_degrees"]
|
|
64
|
+
aid = aspect["aid"]
|
|
65
|
+
diff = aspect["diff"]
|
|
66
|
+
|
|
67
|
+
|
|
59
68
|
if verdict == True:
|
|
60
69
|
d_asp = {
|
|
61
70
|
"p1_name": active_points_list[first]["name"],
|
|
@@ -65,7 +74,6 @@ class NatalAspects:
|
|
|
65
74
|
"aspect": name,
|
|
66
75
|
"orbit": orbit,
|
|
67
76
|
"aspect_degrees": aspect_degrees,
|
|
68
|
-
"color": color,
|
|
69
77
|
"aid": aid,
|
|
70
78
|
"diff": diff,
|
|
71
79
|
"p1": planet_id_decoder(self.celestial_points, active_points_list[first]["name"]),
|
|
@@ -11,6 +11,8 @@ from functools import cached_property
|
|
|
11
11
|
from kerykeion.aspects.natal_aspects import NatalAspects
|
|
12
12
|
from kerykeion.settings.kerykeion_settings import get_settings
|
|
13
13
|
from kerykeion.aspects.aspects_utils import planet_id_decoder, get_aspect_from_two_points, get_active_points_list
|
|
14
|
+
from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
|
|
15
|
+
from typing import Union
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
class SynastryAspects(NatalAspects):
|
|
@@ -20,8 +22,8 @@ class SynastryAspects(NatalAspects):
|
|
|
20
22
|
|
|
21
23
|
def __init__(
|
|
22
24
|
self,
|
|
23
|
-
kr_object_one: AstrologicalSubject,
|
|
24
|
-
kr_object_two: AstrologicalSubject,
|
|
25
|
+
kr_object_one: Union[AstrologicalSubject, AstrologicalSubjectModel],
|
|
26
|
+
kr_object_two: Union[AstrologicalSubject, AstrologicalSubjectModel],
|
|
25
27
|
new_settings_file: Union[Path, None] = None,
|
|
26
28
|
):
|
|
27
29
|
# Subjects
|
|
@@ -60,12 +62,20 @@ class SynastryAspects(NatalAspects):
|
|
|
60
62
|
for first in range(len(first_active_points_list)):
|
|
61
63
|
# Generates the aspects list whitout repetitions
|
|
62
64
|
for second in range(len(second_active_points_list)):
|
|
63
|
-
|
|
65
|
+
aspect = get_aspect_from_two_points(
|
|
64
66
|
self.aspects_settings,
|
|
65
67
|
first_active_points_list[first]["abs_pos"],
|
|
66
68
|
second_active_points_list[second]["abs_pos"],
|
|
67
69
|
)
|
|
68
70
|
|
|
71
|
+
verdict = aspect["verdict"]
|
|
72
|
+
name = aspect["name"]
|
|
73
|
+
orbit = aspect["orbit"]
|
|
74
|
+
aspect_degrees = aspect["aspect_degrees"]
|
|
75
|
+
aid = aspect["aid"]
|
|
76
|
+
diff = aspect["diff"]
|
|
77
|
+
|
|
78
|
+
|
|
69
79
|
if verdict == True:
|
|
70
80
|
d_asp = {
|
|
71
81
|
"p1_name": first_active_points_list[first]["name"],
|
|
@@ -75,7 +85,6 @@ class SynastryAspects(NatalAspects):
|
|
|
75
85
|
"aspect": name,
|
|
76
86
|
"orbit": orbit,
|
|
77
87
|
"aspect_degrees": aspect_degrees,
|
|
78
|
-
"color": color,
|
|
79
88
|
"aid": aid,
|
|
80
89
|
"diff": diff,
|
|
81
90
|
"p1": planet_id_decoder(
|
|
@@ -96,8 +105,8 @@ if __name__ == "__main__":
|
|
|
96
105
|
from kerykeion.utilities import setup_logging
|
|
97
106
|
setup_logging(level="debug")
|
|
98
107
|
|
|
99
|
-
john = AstrologicalSubject("John", 1940, 10, 9,
|
|
100
|
-
yoko = AstrologicalSubject("Yoko", 1933, 2, 18,
|
|
108
|
+
john = AstrologicalSubject("John", 1940, 10, 9, 18, 30, "Liverpool")
|
|
109
|
+
yoko = AstrologicalSubject("Yoko", 1933, 2, 18, 18, 30, "Tokyo", "JP")
|
|
101
110
|
|
|
102
111
|
synastry_aspects = SynastryAspects(john, yoko)
|
|
103
112
|
|