kerykeion 4.16.5__tar.gz → 4.17.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 (38) hide show
  1. {kerykeion-4.16.5 → kerykeion-4.17.0}/PKG-INFO +3 -3
  2. {kerykeion-4.16.5 → kerykeion-4.17.0}/README.md +2 -2
  3. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/aspects/natal_aspects.py +2 -1
  4. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/aspects/synastry_aspects.py +2 -1
  5. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/charts/kerykeion_chart_svg.py +52 -9
  6. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/settings/kerykeion_settings.py +6 -1
  7. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/settings/kr.config.json +168 -0
  8. {kerykeion-4.16.5 → kerykeion-4.17.0}/pyproject.toml +1 -1
  9. {kerykeion-4.16.5 → kerykeion-4.17.0}/LICENSE +0 -0
  10. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/__init__.py +0 -0
  11. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/aspects/__init__.py +0 -0
  12. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/aspects/aspects_utils.py +0 -0
  13. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/astrological_subject.py +0 -0
  14. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/charts/__init__.py +0 -0
  15. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/charts/charts_utils.py +0 -0
  16. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/charts/draw_planets.py +0 -0
  17. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/charts/templates/aspect_grid_only.xml +0 -0
  18. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/charts/templates/chart.xml +0 -0
  19. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/charts/templates/wheel_only.xml +0 -0
  20. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/charts/themes/classic.css +0 -0
  21. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/charts/themes/dark-high-contrast.css +0 -0
  22. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/charts/themes/dark.css +0 -0
  23. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/charts/themes/light.css +0 -0
  24. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/enums.py +0 -0
  25. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/ephemeris_data.py +0 -0
  26. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/fetch_geonames.py +0 -0
  27. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/kr_types/__init__.py +0 -0
  28. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/kr_types/chart_types.py +0 -0
  29. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/kr_types/kerykeion_exception.py +0 -0
  30. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/kr_types/kr_literals.py +0 -0
  31. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/kr_types/kr_models.py +0 -0
  32. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/kr_types/settings_models.py +0 -0
  33. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/relationship_score.py +0 -0
  34. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/report.py +0 -0
  35. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/settings/__init__.py +0 -0
  36. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/sweph/README.md +0 -0
  37. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/sweph/seas_18.se1 +0 -0
  38. {kerykeion-4.16.5 → kerykeion-4.17.0}/kerykeion/utilities.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kerykeion
3
- Version: 4.16.5
3
+ Version: 4.17.0
4
4
  Summary: A python library for astrology.
5
5
  Home-page: https://www.kerykeion.net/
6
6
  License: AGPL-3.0
@@ -318,7 +318,7 @@ More examples [here](https://www.kerykeion.net/docs/examples/perspective-type/).
318
318
 
319
319
  Full list of supported perspective types [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#PerspectiveType).
320
320
 
321
- ## Theme
321
+ ## Themes
322
322
 
323
323
  You can now personalize your astrological charts with different themes! Four themes are available:
324
324
 
@@ -327,7 +327,7 @@ You can now personalize your astrological charts with different themes! Four the
327
327
  - **Dark High Contrast**
328
328
  - **Light**
329
329
 
330
- 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]().
330
+ 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)
331
331
 
332
332
  Here's an example of how to set the theme:
333
333
 
@@ -281,7 +281,7 @@ More examples [here](https://www.kerykeion.net/docs/examples/perspective-type/).
281
281
 
282
282
  Full list of supported perspective types [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#PerspectiveType).
283
283
 
284
- ## Theme
284
+ ## Themes
285
285
 
286
286
  You can now personalize your astrological charts with different themes! Four themes are available:
287
287
 
@@ -290,7 +290,7 @@ You can now personalize your astrological charts with different themes! Four the
290
290
  - **Dark High Contrast**
291
291
  - **Light**
292
292
 
293
- 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]().
293
+ 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)
294
294
 
295
295
  Here's an example of how to set the theme:
296
296
 
@@ -12,6 +12,7 @@ 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
14
  from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
15
+ from kerykeion.kr_types.settings_models import KerykeionSettingsModel
15
16
 
16
17
 
17
18
  AXES_LIST = [
@@ -29,7 +30,7 @@ class NatalAspects:
29
30
  """
30
31
 
31
32
  user: Union[AstrologicalSubject, AstrologicalSubjectModel]
32
- new_settings_file: Union[Path, None] = None
33
+ new_settings_file: Union[Path, KerykeionSettingsModel, dict, None] = None
33
34
 
34
35
  def __post_init__(self):
35
36
  self.settings = get_settings(self.new_settings_file)
@@ -12,6 +12,7 @@ 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
14
  from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
15
+ from kerykeion.kr_types.settings_models import KerykeionSettingsModel
15
16
  from typing import Union
16
17
 
17
18
 
@@ -24,7 +25,7 @@ class SynastryAspects(NatalAspects):
24
25
  self,
25
26
  kr_object_one: Union[AstrologicalSubject, AstrologicalSubjectModel],
26
27
  kr_object_two: Union[AstrologicalSubject, AstrologicalSubjectModel],
27
- new_settings_file: Union[Path, None] = None,
28
+ new_settings_file: Union[Path, KerykeionSettingsModel, dict, None] = None
28
29
  ):
29
30
  # Subjects
30
31
  self.first_user = kr_object_one
@@ -14,7 +14,7 @@ from kerykeion.astrological_subject import AstrologicalSubject
14
14
  from kerykeion.kr_types import KerykeionException, ChartType, KerykeionPointModel, Sign
15
15
  from kerykeion.kr_types import ChartTemplateDictionary
16
16
  from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
17
- from kerykeion.kr_types.settings_models import KerykeionSettingsCelestialPointModel
17
+ from kerykeion.kr_types.settings_models import KerykeionSettingsCelestialPointModel, KerykeionSettingsModel
18
18
  from kerykeion.kr_types.kr_literals import KerykeionChartTheme
19
19
  from kerykeion.charts.charts_utils import (
20
20
  draw_zodiac_slice,
@@ -59,6 +59,8 @@ class KerykeionChartSVG:
59
59
  In the settings file you can set the language, colors, planets, aspects, etc.
60
60
  - theme: Set the theme for the chart (default: classic). If None the <style> tag will be empty.
61
61
  That's useful if you want to use your own CSS file customizing the value of the default theme variables.
62
+ - double_chart_aspect_grid_type: Set the type of the aspect grid for the double chart (transit or synastry). (Default: list.)
63
+ - chart_language: Set the language for the chart (default: EN).
62
64
  """
63
65
 
64
66
  # Constants
@@ -71,7 +73,7 @@ class KerykeionChartSVG:
71
73
  second_obj: Union[AstrologicalSubject, AstrologicalSubjectModel, None]
72
74
  chart_type: ChartType
73
75
  new_output_directory: Union[Path, None]
74
- new_settings_file: Union[Path, None]
76
+ new_settings_file: Union[Path, None, KerykeionSettingsModel, dict]
75
77
  output_directory: Path
76
78
 
77
79
  # Internal properties
@@ -105,13 +107,15 @@ class KerykeionChartSVG:
105
107
  chart_type: ChartType = "Natal",
106
108
  second_obj: Union[AstrologicalSubject, AstrologicalSubjectModel, None] = None,
107
109
  new_output_directory: Union[str, None] = None,
108
- new_settings_file: Union[Path, None] = None,
110
+ new_settings_file: Union[Path, None, KerykeionSettingsModel, dict] = None,
109
111
  theme: Union[KerykeionChartTheme, None] = "classic",
110
- double_chart_aspect_grid_type: Literal["list", "table"] = "list"
112
+ double_chart_aspect_grid_type: Literal["list", "table"] = "list",
113
+ chart_language: str = "EN",
111
114
  ):
112
115
  # Directories:
113
116
  self.homedir = Path.home()
114
117
  self.new_settings_file = new_settings_file
118
+ self.chart_language = chart_language
115
119
 
116
120
  if new_output_directory:
117
121
  self.output_directory = Path(new_output_directory)
@@ -221,14 +225,13 @@ class KerykeionChartSVG:
221
225
  self.output_directory = dir_path
222
226
  logging.info(f"Output direcotry set to: {self.output_directory}")
223
227
 
224
- def parse_json_settings(self, settings_file):
228
+ def parse_json_settings(self, settings_file_or_dict: Union[Path, dict, KerykeionSettingsModel, None]) -> None:
225
229
  """
226
230
  Parse the settings file.
227
231
  """
228
- settings = get_settings(settings_file)
232
+ settings = get_settings(settings_file_or_dict)
229
233
 
230
- language = settings["general_settings"]["language"]
231
- self.language_settings = settings["language_settings"].get(language, "EN")
234
+ self.language_settings = settings["language_settings"][self.chart_language]
232
235
  self.chart_colors_settings = settings["chart_colors"]
233
236
  self.planets_settings = settings["celestial_points"]
234
237
  self.aspects_settings = settings["aspects"]
@@ -845,4 +848,44 @@ if __name__ == "__main__":
845
848
  # Transit Chart With draw_transit_aspect_grid table
846
849
  transit_chart_with_table_grid_subject = AstrologicalSubject("John Lennon - TCWTG", 1940, 10, 9, 18, 30, "Liverpool", "GB")
847
850
  transit_chart_with_table_grid = KerykeionChartSVG(transit_chart_with_table_grid_subject, "Transit", second, double_chart_aspect_grid_type="table", theme="dark")
848
- transit_chart_with_table_grid.makeSVG()
851
+ transit_chart_with_table_grid.makeSVG()
852
+
853
+ # Chines Language Chart
854
+ chinese_subject = AstrologicalSubject("Hua Chenyu", 1990, 2, 7, 12, 0, "Hunan", "CN")
855
+ chinese_chart = KerykeionChartSVG(chinese_subject, chart_language="CN")
856
+ chinese_chart.makeSVG()
857
+
858
+ # French Language Chart
859
+ french_subject = AstrologicalSubject("Jeanne Moreau", 1928, 1, 23, 10, 0, "Paris", "FR")
860
+ french_chart = KerykeionChartSVG(french_subject, chart_language="FR")
861
+ french_chart.makeSVG()
862
+
863
+ # Spanish Language Chart
864
+ spanish_subject = AstrologicalSubject("Antonio Banderas", 1960, 8, 10, 12, 0, "Malaga", "ES")
865
+ spanish_chart = KerykeionChartSVG(spanish_subject, chart_language="ES")
866
+ spanish_chart.makeSVG()
867
+
868
+ # Portuguese Language Chart
869
+ portuguese_subject = AstrologicalSubject("Cristiano Ronaldo", 1985, 2, 5, 5, 25, "Funchal", "PT")
870
+ portuguese_chart = KerykeionChartSVG(portuguese_subject, chart_language="PT")
871
+ portuguese_chart.makeSVG()
872
+
873
+ # Italian Language Chart
874
+ italian_subject = AstrologicalSubject("Sophia Loren", 1934, 9, 20, 2, 0, "Rome", "IT")
875
+ italian_chart = KerykeionChartSVG(italian_subject, chart_language="IT")
876
+ italian_chart.makeSVG()
877
+
878
+ # Russian Language Chart
879
+ russian_subject = AstrologicalSubject("Mikhail Bulgakov", 1891, 5, 15, 12, 0, "Kiev", "UA")
880
+ russian_chart = KerykeionChartSVG(russian_subject, chart_language="RU")
881
+ russian_chart.makeSVG()
882
+
883
+ # Turkish Language Chart
884
+ turkish_subject = AstrologicalSubject("Mehmet Oz", 1960, 6, 11, 12, 0, "Istanbul", "TR")
885
+ turkish_chart = KerykeionChartSVG(turkish_subject, chart_language="TR")
886
+ turkish_chart.makeSVG()
887
+
888
+ # German Language Chart
889
+ german_subject = AstrologicalSubject("Albert Einstein", 1879, 3, 14, 11, 30, "Ulm", "DE")
890
+ german_chart = KerykeionChartSVG(german_subject, chart_language="DE")
891
+ german_chart.makeSVG()
@@ -11,7 +11,7 @@ from typing import Dict, Union
11
11
  from kerykeion.kr_types import KerykeionSettingsModel
12
12
 
13
13
 
14
- def get_settings(new_settings_file: Union[Path, None] = None) -> KerykeionSettingsModel:
14
+ def get_settings(new_settings_file: Union[Path, None, KerykeionSettingsModel, dict] = None) -> KerykeionSettingsModel:
15
15
  """
16
16
  This function is used to get the settings dict from the settings file.
17
17
  If no settings file is passed as argument, or the file is not found, it will fallback to:
@@ -25,6 +25,11 @@ def get_settings(new_settings_file: Union[Path, None] = None) -> KerykeionSettin
25
25
  Dict: The settings dict
26
26
  """
27
27
 
28
+ if isinstance(new_settings_file, dict):
29
+ return KerykeionSettingsModel(**new_settings_file)
30
+ elif isinstance(new_settings_file, KerykeionSettingsModel):
31
+ return new_settings_file
32
+
28
33
  # Config path we passed as argument
29
34
  if new_settings_file is not None:
30
35
  settings_file = new_settings_file
@@ -209,6 +209,174 @@
209
209
  "Chiron": "凱龍星",
210
210
  "Mean_Lilith": "黑月亮"
211
211
  }
212
+ },
213
+ "ES": {
214
+ "info": "Información",
215
+ "cusp": "Casa",
216
+ "longitude": "Longitud",
217
+ "latitude": "Latitud",
218
+ "north": "Norte",
219
+ "east": "Este",
220
+ "south": "Sur",
221
+ "west": "Oeste",
222
+ "fire": "Fuego",
223
+ "earth": "Tierra",
224
+ "air": "Aire",
225
+ "water": "Agua",
226
+ "and_word": "y",
227
+ "transits": "Tránsitos para",
228
+ "type": "Tipo",
229
+ "aspects": "Aspectos de la pareja",
230
+ "planets_and_house": "Puntos para",
231
+ "transit_name": "En el momento del tránsito",
232
+ "lunar_phase": "Fase lunar",
233
+ "day": "Día",
234
+ "celestial_points": {
235
+ "Sun": "Sol",
236
+ "Moon": "Luna",
237
+ "Mercury": "Mercurio",
238
+ "Venus": "Venus",
239
+ "Mars": "Marte",
240
+ "Jupiter": "Júpiter",
241
+ "Saturn": "Saturno",
242
+ "Uranus": "Urano",
243
+ "Neptune": "Neptuno",
244
+ "Pluto": "Plutón",
245
+ "Asc": "Asc",
246
+ "Mc": "Mc",
247
+ "Dsc": "Dsc",
248
+ "Ic": "Ic",
249
+ "True_Node": "Nodo Norte",
250
+ "Mean_Node": "Nodo Medio",
251
+ "Chiron": "Quirón",
252
+ "Mean_Lilith": "Lilith"
253
+ }
254
+ },
255
+ "RU": {
256
+ "info": "Информация",
257
+ "cusp": "Дом",
258
+ "longitude": "Долгота",
259
+ "latitude": "Широта",
260
+ "north": "Север",
261
+ "east": "Восток",
262
+ "south": "Юг",
263
+ "west": "Запад",
264
+ "fire": "Огонь",
265
+ "earth": "Земля",
266
+ "air": "Воздух",
267
+ "water": "Вода",
268
+ "and_word": "и",
269
+ "transits": "Транзиты для",
270
+ "type": "Тип",
271
+ "aspects": "Аспекты пары",
272
+ "planets_and_house": "Пункты для",
273
+ "transit_name": "В момент транзита",
274
+ "lunar_phase": "Лунная фаза",
275
+ "day": "День",
276
+ "celestial_points": {
277
+ "Sun": "Солнце",
278
+ "Moon": "Луна",
279
+ "Mercury": "Меркурий",
280
+ "Venus": "Венера",
281
+ "Mars": "Марс",
282
+ "Jupiter": "Юпитер",
283
+ "Saturn": "Сатурн",
284
+ "Uranus": "Уран",
285
+ "Neptune": "Нептун",
286
+ "Pluto": "Плутон",
287
+ "Asc": "Асц",
288
+ "Mc": "MC",
289
+ "Dsc": "ДСЦ",
290
+ "Ic": "IC",
291
+ "True_Node": "Северный узел",
292
+ "Mean_Node": "Средний узел",
293
+ "Chiron": "Хирон",
294
+ "Mean_Lilith": "Лилит"
295
+ }
296
+ },
297
+ "TR": {
298
+ "info": "Bilgi",
299
+ "cusp": "Ev",
300
+ "longitude": "Boylam",
301
+ "latitude": "Enlem",
302
+ "north": "Kuzey",
303
+ "east": "Doğu",
304
+ "south": "Güney",
305
+ "west": "Batı",
306
+ "fire": "Ateş",
307
+ "earth": "Toprak",
308
+ "air": "Hava",
309
+ "water": "Su",
310
+ "and_word": "ve",
311
+ "transits": "Geçişler için",
312
+ "type": "Tür",
313
+ "aspects": "Çiftin Açılar",
314
+ "planets_and_house": "Puanlar için",
315
+ "transit_name": "Geçiş anında",
316
+ "lunar_phase": "Ay Aşaması",
317
+ "day": "Gün",
318
+ "celestial_points": {
319
+ "Sun": "Güneş",
320
+ "Moon": "Ay",
321
+ "Mercury": "Merkür",
322
+ "Venus": "Venüs",
323
+ "Mars": "Mars",
324
+ "Jupiter": "Jüpiter",
325
+ "Saturn": "Satürn",
326
+ "Uranus": "Uranüs",
327
+ "Neptune": "Neptün",
328
+ "Pluto": "Plüton",
329
+ "Asc": "Yükselen",
330
+ "Mc": "MC",
331
+ "Dsc": "İK",
332
+ "Ic": "IC",
333
+ "True_Node": "Kuzey Düğümü",
334
+ "Mean_Node": "Ortalama Düğüm",
335
+ "Chiron": "Kiron",
336
+ "Mean_Lilith": "Lilith"
337
+ }
338
+ },
339
+ "DE": {
340
+ "info": "Informationen",
341
+ "cusp": "Haus",
342
+ "longitude": "Längengrad",
343
+ "latitude": "Breitengrad",
344
+ "north": "Norden",
345
+ "east": "Osten",
346
+ "south": "Süden",
347
+ "west": "Westen",
348
+ "fire": "Feuer",
349
+ "earth": "Erde",
350
+ "air": "Luft",
351
+ "water": "Wasser",
352
+ "and_word": "und",
353
+ "transits": "Transite für",
354
+ "type": "Typ",
355
+ "aspects": "Aspekte des Paares",
356
+ "planets_and_house": "Punkte für",
357
+ "transit_name": "Zum Zeitpunkt des Transits",
358
+ "lunar_phase": "Mondphase",
359
+ "day": "Tag",
360
+ "celestial_points": {
361
+ "Sun": "Sonne",
362
+ "Moon": "Mond",
363
+ "Mercury": "Merkur",
364
+ "Venus": "Venus",
365
+ "Mars": "Mars",
366
+ "Jupiter": "Jupiter",
367
+ "Saturn": "Saturn",
368
+ "Uranus": "Uranus",
369
+ "Neptune": "Neptun",
370
+ "Pluto": "Pluto",
371
+ "Asc": "Asz",
372
+ "Mc": "MC",
373
+ "Dsc": "DSC",
374
+ "Ic": "IC",
375
+ "True_Node": "Wahrer Mondknoten",
376
+ "Mean_Node": "Mittlerer Mondknoten",
377
+ "Chiron": "Chiron",
378
+ "Mean_Lilith": "Lilith"
379
+ }
212
380
  }
213
381
  },
214
382
  "aspects": [
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "kerykeion"
3
- version = "4.16.5"
3
+ version = "4.17.0"
4
4
  authors = ["Giacomo Battaglia <kerykeion.astrology@gmail.com>"]
5
5
  description = "A python library for astrology."
6
6
  license = "AGPL-3.0"
File without changes