kerykeion 4.0.4__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.0.4 → kerykeion-4.15.0}/PKG-INFO +142 -32
- {kerykeion-4.0.4 → kerykeion-4.15.0}/README.md +135 -27
- kerykeion-4.15.0/kerykeion/__init__.py +17 -0
- {kerykeion-4.0.4 → kerykeion-4.15.0}/kerykeion/aspects/__init__.py +2 -2
- kerykeion-4.15.0/kerykeion/aspects/aspects_utils.py +176 -0
- kerykeion-4.15.0/kerykeion/aspects/natal_aspects.py +143 -0
- kerykeion-4.15.0/kerykeion/aspects/synastry_aspects.py +117 -0
- kerykeion-4.15.0/kerykeion/astrological_subject.py +814 -0
- {kerykeion-4.0.4 → kerykeion-4.15.0}/kerykeion/charts/__init__.py +1 -1
- 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.15.0/kerykeion/charts/templates/chart.xml +537 -0
- kerykeion-4.15.0/kerykeion/enums.py +51 -0
- kerykeion-4.15.0/kerykeion/ephemeris_data.py +178 -0
- {kerykeion-4.0.4 → kerykeion-4.15.0}/kerykeion/fetch_geonames.py +16 -26
- kerykeion-4.15.0/kerykeion/kr_types/__init__.py +10 -0
- {kerykeion-4.0.4 → kerykeion-4.15.0}/kerykeion/kr_types/chart_types.py +30 -39
- {kerykeion-4.0.4 → kerykeion-4.15.0}/kerykeion/kr_types/kerykeion_exception.py +1 -1
- kerykeion-4.15.0/kerykeion/kr_types/kr_literals.py +104 -0
- kerykeion-4.15.0/kerykeion/kr_types/kr_models.py +168 -0
- kerykeion-4.0.4/kerykeion/settings/kerykeion_settings.py → kerykeion-4.15.0/kerykeion/kr_types/settings_models.py +24 -68
- {kerykeion-4.0.4 → kerykeion-4.15.0}/kerykeion/relationship_score.py +12 -17
- {kerykeion-4.0.4 → kerykeion-4.15.0}/kerykeion/report.py +9 -3
- {kerykeion-4.0.4 → kerykeion-4.15.0}/kerykeion/settings/__init__.py +1 -1
- kerykeion-4.15.0/kerykeion/settings/kerykeion_settings.py +71 -0
- {kerykeion-4.0.4 → kerykeion-4.15.0}/kerykeion/settings/kr.config.json +98 -80
- kerykeion-4.15.0/kerykeion/utilities.py +272 -0
- {kerykeion-4.0.4 → kerykeion-4.15.0}/pyproject.toml +11 -9
- kerykeion-4.0.4/kerykeion/__init__.py +0 -108
- kerykeion-4.0.4/kerykeion/aspects/natal_aspects.py +0 -305
- kerykeion-4.0.4/kerykeion/aspects/synastry_aspects.py +0 -85
- kerykeion-4.0.4/kerykeion/astrological_subject.py +0 -561
- kerykeion-4.0.4/kerykeion/charts/charts_utils.py +0 -110
- kerykeion-4.0.4/kerykeion/charts/kerykeion_chart_svg.py +0 -1556
- kerykeion-4.0.4/kerykeion/charts/templates/chart.xml +0 -490
- kerykeion-4.0.4/kerykeion/kr_types/__init__.py +0 -3
- kerykeion-4.0.4/kerykeion/kr_types/kr_literals.py +0 -58
- kerykeion-4.0.4/kerykeion/kr_types/kr_models.py +0 -176
- kerykeion-4.0.4/kerykeion/utilities.py +0 -208
- {kerykeion-4.0.4 → kerykeion-4.15.0}/LICENSE +0 -0
- {kerykeion-4.0.4 → kerykeion-4.15.0}/kerykeion/sweph/README.md +0 -0
- {kerykeion-4.0.4 → 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.0
|
|
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
|
|
@@ -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
|
+
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</a>
|
|
12
12
|
<a href="https://pypi.org/project/kerykeion" target="_blank">
|
|
13
13
|
<img src="https://visitor-badge.laobi.icu/badge?page_id=g-battaglia.kerykeion" alt="visitors"/>
|
|
14
|
-
</a>
|
|
14
|
+
</a>
|
|
15
15
|
<a href="https://pypi.org/project/kerykeion" target="_blank">
|
|
16
16
|
<img src="https://img.shields.io/pypi/v/kerykeion?label=pypi%20package" alt="Package version">
|
|
17
17
|
</a>
|
|
@@ -28,14 +28,17 @@ also it can calculate the aspects of a single persone or between two, you can se
|
|
|
28
28
|
need in the settings in the utility module.
|
|
29
29
|
It also can generate an SVG of a birthchart, a synastry chart or a transit chart.
|
|
30
30
|
|
|
31
|
+
The core goal of this project is to provide a simple and easy approach to astrology in a data driven way.
|
|
32
|
+
|
|
31
33
|
Here's an example of a birthchart:
|
|
32
|
-
|
|
34
|
+
|
|
35
|
+

|
|
33
36
|
|
|
34
37
|
## Web API
|
|
35
38
|
|
|
36
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:
|
|
37
40
|
|
|
38
|
-
**[AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/)**
|
|
41
|
+
**[AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/pricing)**
|
|
39
42
|
|
|
40
43
|
It's [open source](https://github.com/g-battaglia/Astrologer-API), it's a way to support me and the project.
|
|
41
44
|
|
|
@@ -55,9 +58,11 @@ Kerykeion is a _Python 3.9_ package, make sure you have _Python 3.9_ or above in
|
|
|
55
58
|
pip3 install kerykeion
|
|
56
59
|
```
|
|
57
60
|
|
|
58
|
-
## Usage
|
|
61
|
+
## Basic Usage
|
|
62
|
+
|
|
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.
|
|
59
64
|
|
|
60
|
-
Here
|
|
65
|
+
Here's an example:
|
|
61
66
|
|
|
62
67
|
```python
|
|
63
68
|
|
|
@@ -65,8 +70,8 @@ Here some examples:
|
|
|
65
70
|
from kerykeion import AstrologicalSubject
|
|
66
71
|
|
|
67
72
|
# Create a kerykeion instance:
|
|
68
|
-
# Args: Name, year, month, day, hour, minuts, city, nation
|
|
69
|
-
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")
|
|
70
75
|
|
|
71
76
|
# Get the information about the sun in the chart:
|
|
72
77
|
# (The position of the planets always starts at 0)
|
|
@@ -97,38 +102,68 @@ kanye = AstrologicalSubject(
|
|
|
97
102
|
The difference is that you have to pass the longitude, latitude and the timezone string, instead of the city and nation.
|
|
98
103
|
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.
|
|
99
104
|
|
|
100
|
-
## Generate a SVG Chart
|
|
105
|
+
## Generate a SVG Chart
|
|
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
|
|
101
123
|
|
|
102
124
|
```python
|
|
103
125
|
from kerykeion import AstrologicalSubject, KerykeionChartSVG
|
|
104
126
|
|
|
105
|
-
first = AstrologicalSubject("
|
|
106
|
-
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")
|
|
107
129
|
|
|
108
130
|
# Set the type, it can be Natal, Synastry or Transit
|
|
131
|
+
synastry_chart = KerykeionChartSVG(first, "Synastry", second)
|
|
132
|
+
synastry_chart.makeSVG()
|
|
109
133
|
|
|
110
|
-
|
|
111
|
-
name.makeSVG()
|
|
112
|
-
print(len(name.aspects_list))
|
|
134
|
+
```
|
|
113
135
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
|
119
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")
|
|
147
|
+
|
|
148
|
+
# Set the output directory to the current directory
|
|
149
|
+
synastry_chart = KerykeionChartSVG(first, "Synastry", second, new_output_directory=".")
|
|
150
|
+
synastry_chart.makeSVG()
|
|
120
151
|
```
|
|
121
152
|
|
|
122
|
-
|
|
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.
|
|
123
156
|
|
|
124
|
-
|
|
157
|
+
Some examples [here](https://www.kerykeion.net/docs/examples/change-language).
|
|
158
|
+
|
|
159
|
+
## Report
|
|
125
160
|
|
|
126
161
|
To print a report of all the data:
|
|
127
162
|
|
|
128
163
|
```python
|
|
129
164
|
from kerykeion import Report, AstrologicalSubject
|
|
130
165
|
|
|
131
|
-
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta")
|
|
166
|
+
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
|
|
132
167
|
report = Report(kanye)
|
|
133
168
|
report.print_report()
|
|
134
169
|
|
|
@@ -136,7 +171,7 @@ report.print_report()
|
|
|
136
171
|
|
|
137
172
|
Returns:
|
|
138
173
|
|
|
139
|
-
```
|
|
174
|
+
```txt
|
|
140
175
|
+- Kerykeion report for Kanye -+
|
|
141
176
|
+----------+------+-------------+-----------+----------+
|
|
142
177
|
| Date | Time | Location | Longitude | Latitude |
|
|
@@ -182,17 +217,17 @@ Returns:
|
|
|
182
217
|
And if you want to export it to a file:
|
|
183
218
|
|
|
184
219
|
```bash
|
|
185
|
-
|
|
220
|
+
python3 your_script_name.py > file.txt
|
|
186
221
|
```
|
|
187
222
|
|
|
188
|
-
## Other
|
|
223
|
+
## Other examples of possible use cases:
|
|
189
224
|
|
|
190
225
|
```python
|
|
191
226
|
# Get all aspects between two persons:
|
|
192
227
|
|
|
193
228
|
from kerykeion import SynastryAspects, AstrologicalSubject
|
|
194
|
-
first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma")
|
|
195
|
-
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")
|
|
196
231
|
|
|
197
232
|
name = SynastryAspects(first, second)
|
|
198
233
|
aspect_list = name.get_relevant_aspects()
|
|
@@ -204,10 +239,74 @@ print(aspect_list[0])
|
|
|
204
239
|
|
|
205
240
|
```
|
|
206
241
|
|
|
242
|
+
## Ayanamsa (Sidereal Modes)
|
|
243
|
+
|
|
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:
|
|
246
|
+
|
|
247
|
+
```python
|
|
248
|
+
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
More examples [here](https://www.kerykeion.net/docs/examples/sidereal-modes/).
|
|
252
|
+
|
|
253
|
+
Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#SiderealMode).
|
|
254
|
+
|
|
255
|
+
## Houses Systems
|
|
256
|
+
|
|
257
|
+
By default, the houses system is set to Placidus.
|
|
258
|
+
You can set the houses system in the AstrologicalSubject class:
|
|
259
|
+
|
|
260
|
+
```python
|
|
261
|
+
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", houses_system="M")
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
More examples [here](https://www.kerykeion.net/docs/examples/houses-systems/).
|
|
265
|
+
|
|
266
|
+
Full list of supported house systems [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#HousesSystem).
|
|
267
|
+
|
|
268
|
+
So far all the available houses system in the Swiss Ephemeris are supported but the Gauquelin Sectors.
|
|
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
|
+
|
|
207
306
|
## Documentation
|
|
208
307
|
|
|
209
308
|
Most of the functions and the classes are self documented by the types and have docstrings.
|
|
210
|
-
An auto-generated documentation [is available here](https://
|
|
309
|
+
An auto-generated documentation [is available here](https://www.kerykeion.net/pydocs/kerykeion.html).
|
|
211
310
|
|
|
212
311
|
Sooner or later I'll try to write an extensive documentation.
|
|
213
312
|
|
|
@@ -218,3 +317,12 @@ You can clone this repository or download a zip file using the right side button
|
|
|
218
317
|
## Contributing
|
|
219
318
|
|
|
220
319
|
Feel free to contribute to the code!
|
|
320
|
+
|
|
321
|
+
## License
|
|
322
|
+
|
|
323
|
+
This project is licensed under the AGPL-3.0 License.
|
|
324
|
+
To understand how this impacts your use of the software, please see the [LICENSE](LICENSE) file for details.
|
|
325
|
+
If you have questions, you can reach out to me at my [email](mailto:battaglia.giacomo@yahoo.it?subject=Kerykeion) address.
|
|
326
|
+
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.
|
|
327
|
+
|
|
328
|
+
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.
|
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
This is part of Kerykeion (C)
|
|
3
|
+
This is part of Kerykeion (C) 2024 Giacomo Battaglia
|
|
4
4
|
|
|
5
5
|
The aspects module contains the classes and functions for calculating
|
|
6
6
|
aspects between planets and points in a chart.
|
|
@@ -8,4 +8,4 @@ The aspects module contains the classes and functions for calculating
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
from .synastry_aspects import SynastryAspects
|
|
11
|
-
from .natal_aspects import NatalAspects
|
|
11
|
+
from .natal_aspects import NatalAspects
|