kerykeion 4.11.0__tar.gz → 4.18.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.

Files changed (47) hide show
  1. {kerykeion-4.11.0 → kerykeion-4.18.0}/PKG-INFO +129 -29
  2. {kerykeion-4.11.0 → kerykeion-4.18.0}/README.md +126 -26
  3. kerykeion-4.18.0/kerykeion/__init__.py +18 -0
  4. kerykeion-4.18.0/kerykeion/aspects/aspects_utils.py +91 -0
  5. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/aspects/natal_aspects.py +34 -26
  6. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/aspects/synastry_aspects.py +35 -30
  7. kerykeion-4.18.0/kerykeion/astrological_subject.py +818 -0
  8. kerykeion-4.18.0/kerykeion/charts/charts_utils.py +1083 -0
  9. kerykeion-4.18.0/kerykeion/charts/draw_planets.py +407 -0
  10. kerykeion-4.18.0/kerykeion/charts/kerykeion_chart_svg.py +889 -0
  11. kerykeion-4.18.0/kerykeion/charts/templates/aspect_grid_only.xml +452 -0
  12. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/charts/templates/chart.xml +94 -76
  13. kerykeion-4.18.0/kerykeion/charts/templates/wheel_only.xml +499 -0
  14. kerykeion-4.18.0/kerykeion/charts/themes/classic.css +82 -0
  15. kerykeion-4.18.0/kerykeion/charts/themes/dark-high-contrast.css +121 -0
  16. kerykeion-4.18.0/kerykeion/charts/themes/dark.css +121 -0
  17. kerykeion-4.18.0/kerykeion/charts/themes/light.css +117 -0
  18. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/enums.py +1 -0
  19. kerykeion-4.18.0/kerykeion/ephemeris_data.py +178 -0
  20. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/fetch_geonames.py +2 -3
  21. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/kr_types/chart_types.py +6 -16
  22. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/kr_types/kr_literals.py +24 -3
  23. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/kr_types/kr_models.py +77 -22
  24. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/kr_types/settings_models.py +4 -10
  25. kerykeion-4.18.0/kerykeion/relationship_score/__init__.py +2 -0
  26. kerykeion-4.18.0/kerykeion/relationship_score/relationship_score.py +175 -0
  27. kerykeion-4.18.0/kerykeion/relationship_score/relationship_score_factory.py +275 -0
  28. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/report.py +6 -3
  29. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/settings/kerykeion_settings.py +6 -1
  30. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/settings/kr.config.json +256 -102
  31. kerykeion-4.18.0/kerykeion/utilities.py +275 -0
  32. {kerykeion-4.11.0 → kerykeion-4.18.0}/pyproject.toml +3 -3
  33. kerykeion-4.11.0/kerykeion/__init__.py +0 -257
  34. kerykeion-4.11.0/kerykeion/aspects/aspects_utils.py +0 -186
  35. kerykeion-4.11.0/kerykeion/astrological_subject.py +0 -669
  36. kerykeion-4.11.0/kerykeion/charts/charts_utils.py +0 -444
  37. kerykeion-4.11.0/kerykeion/charts/kerykeion_chart_svg.py +0 -1473
  38. kerykeion-4.11.0/kerykeion/relationship_score.py +0 -205
  39. kerykeion-4.11.0/kerykeion/utilities.py +0 -356
  40. {kerykeion-4.11.0 → kerykeion-4.18.0}/LICENSE +0 -0
  41. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/aspects/__init__.py +0 -0
  42. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/charts/__init__.py +0 -0
  43. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/kr_types/__init__.py +0 -0
  44. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/kr_types/kerykeion_exception.py +0 -0
  45. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/settings/__init__.py +0 -0
  46. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/sweph/README.md +0 -0
  47. {kerykeion-4.11.0 → kerykeion-4.18.0}/kerykeion/sweph/seas_18.se1 +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kerykeion
3
- Version: 4.11.0
3
+ Version: 4.18.0
4
4
  Summary: A python library for astrology.
5
- Home-page: https://github.com/g-battaglia/kerykeion
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
9
- Author-email: battaglia.giacomo@yahoo.it
9
+ Author-email: kerykeion.astrology@gmail.com
10
10
  Requires-Python: >=3.9,<4.0
11
11
  Classifier: Development Status :: 5 - Production/Stable
12
12
  Classifier: Intended Audience :: Developers
@@ -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
- ![Kanye Birth Chart](http://centuryboy.altervista.org/KanyeNatalChart.svg)
72
+ ![Kanye Birth Chart](https://www.kerykeion.net/docs/assets/img/examples/birth-chart.svg)
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
- Here some examples:
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(optional)
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,60 @@ 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
+
142
146
  ```python
143
147
  from kerykeion import AstrologicalSubject, KerykeionChartSVG
144
148
 
145
- first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma")
146
- second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma")
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
+ ![John Lennon Birth Chart](https://www.kerykeion.net/docs/assets/img/examples/birth-chart.svg)
158
+
159
+ ### Synastry Chart
160
+
161
+ ```python
162
+ from kerykeion import AstrologicalSubject, KerykeionChartSVG
163
+
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
- name = KerykeionChartSVG(first, chart_type="Synastry", second_obj=second)
151
- name.makeSVG()
152
- print(len(name.aspects_list))
171
+ ```
153
172
 
154
- #> Generating kerykeion object for Jack...
155
- #> Generating kerykeion object for Jane...
156
- #> Jack birth location: Roma, 41.89193, 12.51133
157
- #> SVG Generated Correctly
158
- #> 38
173
+ ![John Lennon and Paul McCartney Synastry](https://www.kerykeion.net/docs/assets/img/examples/synastry-chart.svg)
174
+
175
+ ### Change the output directory
159
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")
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
- ![Synastry Chart](http://centuryboy.altervista.org/JackComposite_Chart.svg)
190
+ ### Change Language
191
+
192
+ You can change the language of the SVG by passing the `chart_language` parameter to the KerykeionChartSVG class:
193
+
194
+ ```python
195
+ first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB", chart_language="ES")
196
+ ```
197
+ More details [here](https://www.kerykeion.net/docs/examples/chart-language).
163
198
 
164
199
  ## Report
165
200
 
@@ -168,7 +203,7 @@ To print a report of all the data:
168
203
  ```python
169
204
  from kerykeion import Report, AstrologicalSubject
170
205
 
171
- kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta")
206
+ kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
172
207
  report = Report(kanye)
173
208
  report.print_report()
174
209
 
@@ -225,14 +260,14 @@ And if you want to export it to a file:
225
260
  python3 your_script_name.py > file.txt
226
261
  ```
227
262
 
228
- ## Other exeples of possibles usecase
263
+ ## Other examples of possible use cases:
229
264
 
230
265
  ```python
231
266
  # Get all aspects between two persons:
232
267
 
233
268
  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")
269
+ first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma", "IT")
270
+ second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma", "IT")
236
271
 
237
272
  name = SynastryAspects(first, second)
238
273
  aspect_list = name.get_relevant_aspects()
@@ -246,7 +281,8 @@ print(aspect_list[0])
246
281
 
247
282
  ## Ayanamsa (Sidereal Modes)
248
283
 
249
- You can set the zodiac type and the sidereal mode in the AstrologicalSubject class:
284
+ By default, the zodiac type is set to Tropic (Tropical).
285
+ You can set the zodiac type to Sidereal and the sidereal mode in the AstrologicalSubject class:
250
286
 
251
287
  ```python
252
288
  johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
@@ -258,18 +294,78 @@ Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/ke
258
294
 
259
295
  ## Houses Systems
260
296
 
297
+ By default, the houses system is set to Placidus.
261
298
  You can set the houses system in the AstrologicalSubject class:
262
299
 
263
300
  ```python
264
301
  johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", houses_system="M")
265
302
  ```
266
303
 
267
- More examples [here](https://www.kerykeion.net/docs/examples/house-systems/).
304
+ More examples [here](https://www.kerykeion.net/docs/examples/houses-systems/).
268
305
 
269
306
  Full list of supported house systems [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#HousesSystem).
270
307
 
271
308
  So far all the available houses system in the Swiss Ephemeris are supported but the Gauquelin Sectors.
272
309
 
310
+ ## Perspective Type
311
+
312
+ By default, the perspective type is set to Apparent Geocentric (the most common standard for astrology).
313
+ The perspective indicates the point of view from which the chart is calculated (Es. Apparent Geocentric, Heliocentric, etc.).
314
+ You can set the perspective type in the AstrologicalSubject class:
315
+
316
+ ```python
317
+ johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", perspective_type="Heliocentric")
318
+ ```
319
+
320
+ More examples [here](https://www.kerykeion.net/docs/examples/perspective-type/).
321
+
322
+ Full list of supported perspective types [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#PerspectiveType).
323
+
324
+ ## Themes
325
+
326
+ You can now personalize your astrological charts with different themes! Four themes are available:
327
+
328
+ - **Classic** (default)
329
+ - **Dark**
330
+ - **Dark High Contrast**
331
+ - **Light**
332
+
333
+ Each theme offers a distinct visual style, allowing you to choose the one that best suits your preferences or presentation needs. If you prefer more control over the appearance, you can opt not to set any theme, making it easier to customize the chart by overriding the default CSS variables. For more detailed instructions on how to apply themes, check the [documentation](https://www.kerykeion.net/docs/examples/theming)
334
+
335
+ Here's an example of how to set the theme:
336
+
337
+ ```python
338
+ from kerykeion import AstrologicalSubject, KerykeionChartSVG
339
+
340
+ dark_theme_subject = AstrologicalSubject("John Lennon - Dark Theme", 1940, 10, 9, 18, 30, "Liverpool", "GB")
341
+ dark_theme_natal_chart = KerykeionChartSVG(dark_high_contrast_theme_subject, theme="dark_high_contrast")
342
+ dark_theme_natal_chart.makeSVG()
343
+ ```
344
+
345
+ ![John Lennon](https://www.kerykeion.net/assets/img/showcase/John%20Lennon%20-%20Dark%20-%20Natal%20Chart.svg)
346
+
347
+ ## Alternative Initialization
348
+
349
+ You can initialize the AstrologicalSubject from a **UTC** ISO 8601 string:
350
+
351
+ ```python
352
+ subject = AstrologicalSubject.get_from_iso_utc_time(
353
+ "Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US")
354
+ ```
355
+
356
+ Note : The default time zone is UTC, with Greenwich longitude and latitude.
357
+
358
+ The default online/offline mode is set to offline, if you set it online the default latitude and longitude will be ignored and
359
+ calculated from the city and nation. Remember to pass also the geonames_username parameter if you want to use the online mode, like this:
360
+
361
+ ```python
362
+ from kerykeion.astrological_subject import AstrologicalSubject
363
+
364
+ # Use the static method get_from_iso_utc_time to create an instance of AstrologicalSubject
365
+ subject = AstrologicalSubject.get_from_iso_utc_time(
366
+ "Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US", online=True)
367
+ ```
368
+
273
369
  ## Documentation
274
370
 
275
371
  Most of the functions and the classes are self documented by the types and have docstrings.
@@ -281,16 +377,20 @@ Sooner or later I'll try to write an extensive documentation.
281
377
 
282
378
  You can clone this repository or download a zip file using the right side buttons.
283
379
 
284
- ## Contributing
380
+ ## Integrate Kerykeion Functionalities in Your Project
285
381
 
286
- Feel free to contribute to the code!
382
+ If you are interested in integrating Kerykeion's astrological functionalities into your project, I would be happy to collaborate with you. Whether you need custom features, support, or consultation, feel free to reach out to me at my [email](mailto:kerykeion.astrology@gmail.com?subject=Integration%20Request) address.
287
383
 
288
384
  ## License
289
385
 
290
386
  This project is licensed under the AGPL-3.0 License.
291
387
  To understand how this impacts your use of the software, please see the [LICENSE](LICENSE) file for details.
292
- If you have questions, you can reach out to me at my [email](mailto:battaglia.giacomo@yahoo.it?subject=Kerykeion) address.
388
+ If you have questions, you can reach out to me at my [email](mailto:kerykeion.astrology@gmail.com?subject=Kerykeion) address.
293
389
  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.
294
390
 
295
391
  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.
296
392
 
393
+ ## Contributing
394
+
395
+ Feel free to contribute to the code!
396
+
@@ -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
- ![Kanye Birth Chart](http://centuryboy.altervista.org/KanyeNatalChart.svg)
35
+ ![Kanye Birth Chart](https://www.kerykeion.net/docs/assets/img/examples/birth-chart.svg)
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
- Here some examples:
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(optional)
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,60 @@ 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
+
105
109
  ```python
106
110
  from kerykeion import AstrologicalSubject, KerykeionChartSVG
107
111
 
108
- first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma")
109
- second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma")
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
+ ![John Lennon Birth Chart](https://www.kerykeion.net/docs/assets/img/examples/birth-chart.svg)
121
+
122
+ ### Synastry Chart
123
+
124
+ ```python
125
+ from kerykeion import AstrologicalSubject, KerykeionChartSVG
126
+
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
- name = KerykeionChartSVG(first, chart_type="Synastry", second_obj=second)
114
- name.makeSVG()
115
- print(len(name.aspects_list))
134
+ ```
116
135
 
117
- #> Generating kerykeion object for Jack...
118
- #> Generating kerykeion object for Jane...
119
- #> Jack birth location: Roma, 41.89193, 12.51133
120
- #> SVG Generated Correctly
121
- #> 38
136
+ ![John Lennon and Paul McCartney Synastry](https://www.kerykeion.net/docs/assets/img/examples/synastry-chart.svg)
137
+
138
+ ### Change the output directory
122
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")
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
- ![Synastry Chart](http://centuryboy.altervista.org/JackComposite_Chart.svg)
153
+ ### Change Language
154
+
155
+ You can change the language of the SVG by passing the `chart_language` parameter to the KerykeionChartSVG class:
156
+
157
+ ```python
158
+ first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB", chart_language="ES")
159
+ ```
160
+ More details [here](https://www.kerykeion.net/docs/examples/chart-language).
126
161
 
127
162
  ## Report
128
163
 
@@ -131,7 +166,7 @@ To print a report of all the data:
131
166
  ```python
132
167
  from kerykeion import Report, AstrologicalSubject
133
168
 
134
- kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta")
169
+ kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
135
170
  report = Report(kanye)
136
171
  report.print_report()
137
172
 
@@ -188,14 +223,14 @@ And if you want to export it to a file:
188
223
  python3 your_script_name.py > file.txt
189
224
  ```
190
225
 
191
- ## Other exeples of possibles usecase
226
+ ## Other examples of possible use cases:
192
227
 
193
228
  ```python
194
229
  # Get all aspects between two persons:
195
230
 
196
231
  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")
232
+ first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma", "IT")
233
+ second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma", "IT")
199
234
 
200
235
  name = SynastryAspects(first, second)
201
236
  aspect_list = name.get_relevant_aspects()
@@ -209,7 +244,8 @@ print(aspect_list[0])
209
244
 
210
245
  ## Ayanamsa (Sidereal Modes)
211
246
 
212
- You can set the zodiac type and the sidereal mode in the AstrologicalSubject class:
247
+ By default, the zodiac type is set to Tropic (Tropical).
248
+ You can set the zodiac type to Sidereal and the sidereal mode in the AstrologicalSubject class:
213
249
 
214
250
  ```python
215
251
  johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
@@ -221,18 +257,78 @@ Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/ke
221
257
 
222
258
  ## Houses Systems
223
259
 
260
+ By default, the houses system is set to Placidus.
224
261
  You can set the houses system in the AstrologicalSubject class:
225
262
 
226
263
  ```python
227
264
  johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", houses_system="M")
228
265
  ```
229
266
 
230
- More examples [here](https://www.kerykeion.net/docs/examples/house-systems/).
267
+ More examples [here](https://www.kerykeion.net/docs/examples/houses-systems/).
231
268
 
232
269
  Full list of supported house systems [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#HousesSystem).
233
270
 
234
271
  So far all the available houses system in the Swiss Ephemeris are supported but the Gauquelin Sectors.
235
272
 
273
+ ## Perspective Type
274
+
275
+ By default, the perspective type is set to Apparent Geocentric (the most common standard for astrology).
276
+ The perspective indicates the point of view from which the chart is calculated (Es. Apparent Geocentric, Heliocentric, etc.).
277
+ You can set the perspective type in the AstrologicalSubject class:
278
+
279
+ ```python
280
+ johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", perspective_type="Heliocentric")
281
+ ```
282
+
283
+ More examples [here](https://www.kerykeion.net/docs/examples/perspective-type/).
284
+
285
+ Full list of supported perspective types [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#PerspectiveType).
286
+
287
+ ## Themes
288
+
289
+ You can now personalize your astrological charts with different themes! Four themes are available:
290
+
291
+ - **Classic** (default)
292
+ - **Dark**
293
+ - **Dark High Contrast**
294
+ - **Light**
295
+
296
+ Each theme offers a distinct visual style, allowing you to choose the one that best suits your preferences or presentation needs. If you prefer more control over the appearance, you can opt not to set any theme, making it easier to customize the chart by overriding the default CSS variables. For more detailed instructions on how to apply themes, check the [documentation](https://www.kerykeion.net/docs/examples/theming)
297
+
298
+ Here's an example of how to set the theme:
299
+
300
+ ```python
301
+ from kerykeion import AstrologicalSubject, KerykeionChartSVG
302
+
303
+ dark_theme_subject = AstrologicalSubject("John Lennon - Dark Theme", 1940, 10, 9, 18, 30, "Liverpool", "GB")
304
+ dark_theme_natal_chart = KerykeionChartSVG(dark_high_contrast_theme_subject, theme="dark_high_contrast")
305
+ dark_theme_natal_chart.makeSVG()
306
+ ```
307
+
308
+ ![John Lennon](https://www.kerykeion.net/assets/img/showcase/John%20Lennon%20-%20Dark%20-%20Natal%20Chart.svg)
309
+
310
+ ## Alternative Initialization
311
+
312
+ You can initialize the AstrologicalSubject from a **UTC** ISO 8601 string:
313
+
314
+ ```python
315
+ subject = AstrologicalSubject.get_from_iso_utc_time(
316
+ "Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US")
317
+ ```
318
+
319
+ Note : The default time zone is UTC, with Greenwich longitude and latitude.
320
+
321
+ The default online/offline mode is set to offline, if you set it online the default latitude and longitude will be ignored and
322
+ calculated from the city and nation. Remember to pass also the geonames_username parameter if you want to use the online mode, like this:
323
+
324
+ ```python
325
+ from kerykeion.astrological_subject import AstrologicalSubject
326
+
327
+ # Use the static method get_from_iso_utc_time to create an instance of AstrologicalSubject
328
+ subject = AstrologicalSubject.get_from_iso_utc_time(
329
+ "Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US", online=True)
330
+ ```
331
+
236
332
  ## Documentation
237
333
 
238
334
  Most of the functions and the classes are self documented by the types and have docstrings.
@@ -244,15 +340,19 @@ Sooner or later I'll try to write an extensive documentation.
244
340
 
245
341
  You can clone this repository or download a zip file using the right side buttons.
246
342
 
247
- ## Contributing
343
+ ## Integrate Kerykeion Functionalities in Your Project
248
344
 
249
- Feel free to contribute to the code!
345
+ If you are interested in integrating Kerykeion's astrological functionalities into your project, I would be happy to collaborate with you. Whether you need custom features, support, or consultation, feel free to reach out to me at my [email](mailto:kerykeion.astrology@gmail.com?subject=Integration%20Request) address.
250
346
 
251
347
  ## License
252
348
 
253
349
  This project is licensed under the AGPL-3.0 License.
254
350
  To understand how this impacts your use of the software, please see the [LICENSE](LICENSE) file for details.
255
- If you have questions, you can reach out to me at my [email](mailto:battaglia.giacomo@yahoo.it?subject=Kerykeion) address.
351
+ If you have questions, you can reach out to me at my [email](mailto:kerykeion.astrology@gmail.com?subject=Kerykeion) address.
256
352
  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.
257
353
 
258
354
  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.
355
+
356
+ ## Contributing
357
+
358
+ Feel free to contribute to the code!
@@ -0,0 +1,18 @@
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.relationship_score import RelationshipScore
13
+ from .relationship_score.relationship_score_factory import RelationshipScoreFactory
14
+ from .aspects import SynastryAspects, NatalAspects
15
+ from .report import Report
16
+ from .settings import KerykeionSettingsModel, get_settings
17
+ from .enums import Planets, Aspects, Signs
18
+ from .ephemeris_data import EphemerisDataFactory
@@ -0,0 +1,91 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ This is part of Kerykeion (C) 2024 Giacomo Battaglia
4
+ """
5
+ # TODO: Better documentation and unit tests
6
+
7
+ from kerykeion import AstrologicalSubject
8
+ from kerykeion.settings import KerykeionSettingsModel
9
+ from swisseph import difdeg2n
10
+ from typing import Union
11
+ from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
12
+ from kerykeion.kr_types.settings_models import KerykeionSettingsCelestialPointModel, KerykeionSettingsAspectModel
13
+
14
+
15
+ def get_aspect_from_two_points(
16
+ aspects_settings: Union[list[KerykeionSettingsAspectModel], list[dict]],
17
+ point_one: Union[float, int],
18
+ point_two: Union[float, int],
19
+ ):
20
+ """
21
+ Utility function to calculate the aspects between two points.
22
+
23
+ Args:
24
+ aspects_settings (dict): Dictionary containing aspect settings.
25
+ point_one (Union[float, int]): First point.
26
+ point_two (Union[float, int]): Second point.
27
+
28
+ Returns:
29
+ dict: Dictionary containing the aspect details.
30
+ """
31
+ distance = abs(difdeg2n(point_one, point_two))
32
+ diff = abs(point_one - point_two)
33
+
34
+ for aid, aspect in enumerate(aspects_settings):
35
+ aspect_degree = aspect["degree"] # type: ignore
36
+ aspect_orb = aspect["orb"] # type: ignore
37
+
38
+ if (aspect_degree - aspect_orb) <= int(distance) <= (aspect_degree + aspect_orb):
39
+ name = aspect["name"] # type: ignore
40
+ aspect_degrees = aspect_degree
41
+ verdict = True
42
+ break
43
+ else:
44
+ verdict = False
45
+ name = None
46
+ aspect_degrees = 0
47
+ aid = None # type: ignore
48
+
49
+ return {
50
+ "verdict": verdict,
51
+ "name": name,
52
+ "orbit": distance - aspect_degrees,
53
+ "distance": distance - aspect_degrees,
54
+ "aspect_degrees": aspect_degrees,
55
+ "aid": aid,
56
+ "diff": diff,
57
+ }
58
+
59
+
60
+ def planet_id_decoder(planets_settings: list[KerykeionSettingsCelestialPointModel], name: str) -> int:
61
+ """
62
+ Check if the name of the planet is the same in the settings and return
63
+ the correct id for the planet.
64
+ """
65
+ str_name = str(name)
66
+ for planet in planets_settings:
67
+ if planet["name"] == str_name:
68
+ result = planet["id"]
69
+ return result
70
+
71
+ raise ValueError(f"Planet {name} not found in the settings")
72
+
73
+
74
+ def get_active_points_list(
75
+ subject: Union[AstrologicalSubject, AstrologicalSubjectModel], settings: Union[KerykeionSettingsModel, dict]
76
+ ) -> list:
77
+ """
78
+ Given an astrological subject and the settings, return a list of the active points.
79
+ Args:
80
+ subject (AstrologicalSubject): The astrological subject to get the active points from.
81
+ settings (Union[KerykeionSettingsModel, dict]): Settings model o dictionary.
82
+
83
+ Returns:
84
+ list: List of the active points.
85
+ """
86
+ point_list = []
87
+ for planet in settings["celestial_points"]:
88
+ if planet["is_active"] == True:
89
+ point_list.append(subject[planet["name"].lower()])
90
+
91
+ return point_list