kerykeion 4.19.0__py3-none-any.whl → 4.21.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of kerykeion might be problematic. Click here for more details.
- kerykeion/__init__.py +1 -1
- kerykeion/aspects/__init__.py +2 -2
- kerykeion/aspects/aspects_utils.py +1 -1
- kerykeion/aspects/natal_aspects.py +1 -1
- kerykeion/aspects/synastry_aspects.py +1 -1
- kerykeion/astrological_subject.py +8 -3
- kerykeion/charts/__init__.py +2 -2
- kerykeion/charts/kerykeion_chart_svg.py +19 -5
- kerykeion/fetch_geonames.py +8 -5
- kerykeion/kr_types/__init__.py +1 -1
- kerykeion/kr_types/kerykeion_exception.py +1 -1
- kerykeion/kr_types/kr_literals.py +1 -1
- kerykeion/kr_types/kr_models.py +1 -1
- kerykeion/kr_types/settings_models.py +1 -1
- kerykeion/relationship_score/relationship_score.py +1 -1
- kerykeion/relationship_score/relationship_score_factory.py +1 -1
- kerykeion/settings/kerykeion_settings.py +1 -1
- {kerykeion-4.19.0.dist-info → kerykeion-4.21.0.dist-info}/METADATA +17 -1
- {kerykeion-4.19.0.dist-info → kerykeion-4.21.0.dist-info}/RECORD +22 -22
- {kerykeion-4.19.0.dist-info → kerykeion-4.21.0.dist-info}/WHEEL +1 -1
- {kerykeion-4.19.0.dist-info → kerykeion-4.21.0.dist-info}/LICENSE +0 -0
- {kerykeion-4.19.0.dist-info → kerykeion-4.21.0.dist-info}/entry_points.txt +0 -0
kerykeion/__init__.py
CHANGED
kerykeion/aspects/__init__.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
This is part of Kerykeion (C)
|
|
3
|
+
This is part of Kerykeion (C) 2025 Giacomo Battaglia
|
|
4
4
|
|
|
5
|
-
The aspects module contains the classes and functions for calculating
|
|
5
|
+
The aspects module contains the classes and functions for calculating
|
|
6
6
|
aspects between planets and points in a chart.
|
|
7
7
|
"""
|
|
8
8
|
|
|
@@ -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) 2025 Giacomo Battaglia
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
import pytz
|
|
@@ -40,6 +40,7 @@ DEFAULT_SIDEREAL_MODE: SiderealMode = "FAGAN_BRADLEY"
|
|
|
40
40
|
DEFAULT_HOUSES_SYSTEM_IDENTIFIER: HousesSystemIdentifier = "P"
|
|
41
41
|
DEFAULT_ZODIAC_TYPE: ZodiacType = "Tropic"
|
|
42
42
|
DEFAULT_PERSPECTIVE_TYPE: PerspectiveType = "Apparent Geocentric"
|
|
43
|
+
DEFAULT_GEONAMES_CACHE_EXPIRE_AFTER_DAYS = 30
|
|
43
44
|
GEONAMES_DEFAULT_USERNAME_WARNING = (
|
|
44
45
|
"\n********\n"
|
|
45
46
|
"NO GEONAMES USERNAME SET!\n"
|
|
@@ -89,6 +90,7 @@ class AstrologicalSubject:
|
|
|
89
90
|
- perspective_type (PerspectiveType, optional): The perspective to use for the calculation of the chart.
|
|
90
91
|
Defaults to "Apparent Geocentric".
|
|
91
92
|
Available perspectives are visible in the PerspectiveType Literal.
|
|
93
|
+
- cache_expire_after_days (int, optional): The number of days after which the geonames cache will expire. Defaults to 30.
|
|
92
94
|
- is_dst (Union[None, bool], optional): Specify if the time is in DST. Defaults to None.
|
|
93
95
|
By default (None), the library will try to guess if the time is in DST or not and raise an AmbiguousTimeError
|
|
94
96
|
if it can't guess. If you know the time is in DST, set this to True, if you know it's not, set it to False.
|
|
@@ -187,6 +189,7 @@ class AstrologicalSubject:
|
|
|
187
189
|
sidereal_mode: Union[SiderealMode, None] = None,
|
|
188
190
|
houses_system_identifier: HousesSystemIdentifier = DEFAULT_HOUSES_SYSTEM_IDENTIFIER,
|
|
189
191
|
perspective_type: PerspectiveType = DEFAULT_PERSPECTIVE_TYPE,
|
|
192
|
+
cache_expire_after_days: int = DEFAULT_GEONAMES_CACHE_EXPIRE_AFTER_DAYS,
|
|
190
193
|
is_dst: Union[None, bool] = None,
|
|
191
194
|
disable_chiron_and_lilith: bool = False
|
|
192
195
|
) -> None:
|
|
@@ -219,6 +222,7 @@ class AstrologicalSubject:
|
|
|
219
222
|
self.sidereal_mode = sidereal_mode
|
|
220
223
|
self.houses_system_identifier = houses_system_identifier
|
|
221
224
|
self.perspective_type = perspective_type
|
|
225
|
+
self.cache_expire_after_days = cache_expire_after_days
|
|
222
226
|
self.is_dst = is_dst
|
|
223
227
|
self.disable_chiron_and_lilith = disable_chiron_and_lilith
|
|
224
228
|
|
|
@@ -227,7 +231,7 @@ class AstrologicalSubject:
|
|
|
227
231
|
#---------------#
|
|
228
232
|
|
|
229
233
|
# Geonames username
|
|
230
|
-
if geonames_username is None and online:
|
|
234
|
+
if geonames_username is None and online and (not lat or not lng or not tz_str):
|
|
231
235
|
logging.warning(GEONAMES_DEFAULT_USERNAME_WARNING)
|
|
232
236
|
self.geonames_username = DEFAULT_GEONAMES_USERNAME
|
|
233
237
|
else:
|
|
@@ -381,6 +385,7 @@ class AstrologicalSubject:
|
|
|
381
385
|
self.city,
|
|
382
386
|
self.nation,
|
|
383
387
|
username=self.geonames_username,
|
|
388
|
+
cache_expire_after_days=self.cache_expire_after_days
|
|
384
389
|
)
|
|
385
390
|
self.city_data: dict[str, str] = geonames.get_serialized_data()
|
|
386
391
|
|
|
@@ -835,5 +840,5 @@ if __name__ == "__main__":
|
|
|
835
840
|
print(johnny.mean_lilith)
|
|
836
841
|
|
|
837
842
|
# Offline mode
|
|
838
|
-
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", online=False, tz_str="America/New_York", lng=-87.1111, lat=37.7711)
|
|
843
|
+
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", online=False, tz_str="America/New_York", lng=-87.1111, lat=37.7711, sidereal_mode="FAGAN_BRADLEY", zodiac_type="Sidereal")
|
|
839
844
|
print(johnny.json(dump=True, indent=2))
|
kerykeion/charts/__init__.py
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
This is part of Kerykeion (C)
|
|
3
|
+
This is part of Kerykeion (C) 2025 Giacomo Battaglia
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
import logging
|
|
8
|
+
import swisseph as swe
|
|
8
9
|
from typing import get_args
|
|
9
10
|
|
|
10
11
|
from kerykeion.settings.kerykeion_settings import get_settings
|
|
@@ -408,11 +409,19 @@ class KerykeionChartSVG:
|
|
|
408
409
|
else:
|
|
409
410
|
template_dict["stringTitle"] = self.user.name
|
|
410
411
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
if self.user.zodiac_type == 'Tropic':
|
|
413
|
+
zodiac_info = "Tropical Zodiac"
|
|
414
|
+
|
|
415
|
+
else:
|
|
416
|
+
mode_const = "SIDM_" + self.user.sidereal_mode # type: ignore
|
|
417
|
+
mode_name = swe.get_ayanamsa_name(getattr(swe, mode_const))
|
|
418
|
+
zodiac_info = f"Ayanamsa: {mode_name}"
|
|
419
|
+
|
|
420
|
+
template_dict["bottomLeft0"] = f"{self.user.houses_system_name} Houses"
|
|
421
|
+
template_dict["bottomLeft1"] = zodiac_info
|
|
422
|
+
|
|
414
423
|
if self.chart_type in ["Natal", "ExternalNatal", "Synastry"]:
|
|
415
|
-
template_dict["bottomLeft2"] = f'{self.language_settings.get("lunar_phase", "Lunar Phase")}
|
|
424
|
+
template_dict["bottomLeft2"] = f'{self.language_settings.get("lunar_phase", "Lunar Phase")} {self.language_settings.get("day", "Day").lower()}: {self.user.lunar_phase.get("moon_phase", "")}'
|
|
416
425
|
template_dict["bottomLeft3"] = f'{self.language_settings.get("lunar_phase", "Lunar Phase")}: {self.user.lunar_phase.moon_phase_name}'
|
|
417
426
|
template_dict["bottomLeft4"] = f'{self.user.perspective_type}'
|
|
418
427
|
else:
|
|
@@ -905,3 +914,8 @@ if __name__ == "__main__":
|
|
|
905
914
|
hindi_subject = AstrologicalSubject("Amitabh Bachchan", 1942, 10, 11, 4, 0, "Allahabad", "IN")
|
|
906
915
|
hindi_chart = KerykeionChartSVG(hindi_subject, chart_language="HI")
|
|
907
916
|
hindi_chart.makeSVG()
|
|
917
|
+
|
|
918
|
+
# Kanye West Natal Chart
|
|
919
|
+
kanye_west_subject = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
|
|
920
|
+
kanye_west_chart = KerykeionChartSVG(kanye_west_subject)
|
|
921
|
+
kanye_west_chart.makeSVG()
|
kerykeion/fetch_geonames.py
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
This is part of Kerykeion (C)
|
|
3
|
+
This is part of Kerykeion (C) 2025 Giacomo Battaglia
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
import logging
|
|
8
|
+
from datetime import timedelta
|
|
8
9
|
from requests import Request
|
|
9
10
|
from requests_cache import CachedSession
|
|
10
11
|
from typing import Union
|
|
@@ -15,9 +16,10 @@ class FetchGeonames:
|
|
|
15
16
|
Class to handle requests to the GeoNames API
|
|
16
17
|
|
|
17
18
|
Args:
|
|
18
|
-
city_name (str): Name of the city
|
|
19
|
-
country_code (str): Two letters country code
|
|
20
|
-
username (str, optional): GeoNames username, defaults to "century.boy".
|
|
19
|
+
- city_name (str): Name of the city
|
|
20
|
+
- country_code (str): Two letters country code
|
|
21
|
+
- username (str, optional): GeoNames username, defaults to "century.boy".
|
|
22
|
+
- cache_expire_after_days (int, optional): Cache expiration time in days, defaults to 30.
|
|
21
23
|
"""
|
|
22
24
|
|
|
23
25
|
def __init__(
|
|
@@ -25,11 +27,12 @@ class FetchGeonames:
|
|
|
25
27
|
city_name: str,
|
|
26
28
|
country_code: str,
|
|
27
29
|
username: str = "century.boy",
|
|
30
|
+
cache_expire_after_days=30,
|
|
28
31
|
):
|
|
29
32
|
self.session = CachedSession(
|
|
30
33
|
cache_name="cache/kerykeion_geonames_cache",
|
|
31
34
|
backend="sqlite",
|
|
32
|
-
expire_after=
|
|
35
|
+
expire_after=timedelta(days=cache_expire_after_days),
|
|
33
36
|
)
|
|
34
37
|
|
|
35
38
|
self.username = username
|
kerykeion/kr_types/__init__.py
CHANGED
kerykeion/kr_types/kr_models.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: kerykeion
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.21.0
|
|
4
4
|
Summary: A python library for astrology.
|
|
5
5
|
Home-page: https://www.kerykeion.net/
|
|
6
6
|
License: AGPL-3.0
|
|
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
23
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
23
24
|
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
24
25
|
Classifier: Topic :: Software Development
|
|
@@ -396,6 +397,21 @@ Example:
|
|
|
396
397
|
...
|
|
397
398
|
```
|
|
398
399
|
|
|
400
|
+
In the charts, by default, the mean nodes (M) are displayed, while the true nodes are not displayed.
|
|
401
|
+
To display them, you need to edit the configuration file (kr.config.json).
|
|
402
|
+
|
|
403
|
+
## JSON Support
|
|
404
|
+
|
|
405
|
+
The astrological subject, which is the base of data used in the library, can be easily serialized to JSON with the `json` method.
|
|
406
|
+
|
|
407
|
+
```python
|
|
408
|
+
from kerykeion import AstrologicalSubject
|
|
409
|
+
|
|
410
|
+
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US")
|
|
411
|
+
|
|
412
|
+
print(johnny.json(dump=False, indent=2))
|
|
413
|
+
```
|
|
414
|
+
|
|
399
415
|
## Documentation
|
|
400
416
|
|
|
401
417
|
Most of the functions and the classes are self documented by the types and have docstrings.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
|
|
2
|
-
kerykeion/__init__.py,sha256=
|
|
3
|
-
kerykeion/aspects/__init__.py,sha256=
|
|
4
|
-
kerykeion/aspects/aspects_utils.py,sha256=
|
|
5
|
-
kerykeion/aspects/natal_aspects.py,sha256=
|
|
6
|
-
kerykeion/aspects/synastry_aspects.py,sha256=
|
|
7
|
-
kerykeion/astrological_subject.py,sha256=
|
|
8
|
-
kerykeion/charts/__init__.py,sha256=
|
|
2
|
+
kerykeion/__init__.py,sha256=XtKNBNSVsQ-PAbnJfNUcw-femdF4NgQqohMtM0cRH18,639
|
|
3
|
+
kerykeion/aspects/__init__.py,sha256=9kx_Rx1NJx5SM7nDCSbI79S1neZ3c-q2NvQr-S6A9PY,292
|
|
4
|
+
kerykeion/aspects/aspects_utils.py,sha256=XyjQvvdrN6-L8QqpecV-mCG9Wb8I9G0S1ZvzXIsQSCk,2977
|
|
5
|
+
kerykeion/aspects/natal_aspects.py,sha256=I5HyT9BHUR0r5xlbCj-EYLxvsRWLVi59Jynlpq04-cY,5548
|
|
6
|
+
kerykeion/aspects/synastry_aspects.py,sha256=HtXSVPkiDQmbkqnI7k9IOhCgON59VZXjflqWJdugwyI,4327
|
|
7
|
+
kerykeion/astrological_subject.py,sha256=KalMYAY4s-1eaV5-L9YsgJRAZah4MnTwSelQPuRkOQ4,36764
|
|
8
|
+
kerykeion/charts/__init__.py,sha256=i9NMZ7LdkllPlqQSi1or9gTobHbROGDKmJhBDO4R0mA,128
|
|
9
9
|
kerykeion/charts/charts_utils.py,sha256=Qql2Z_9xPaxQUaH6AOs8F9maYMqpG9DejYY0LKQT4_U,42265
|
|
10
10
|
kerykeion/charts/draw_planets.py,sha256=Uty3zpWYMQZvvK7ZHhlmynCHeL8DIN3qL2ifnBXVciM,17393
|
|
11
|
-
kerykeion/charts/kerykeion_chart_svg.py,sha256=
|
|
11
|
+
kerykeion/charts/kerykeion_chart_svg.py,sha256=1k3TDnngStieOKxY69aaHdjJCrh9wr8FBzT5o6BepRs,43918
|
|
12
12
|
kerykeion/charts/templates/aspect_grid_only.xml,sha256=qXR4agGqI7GB_4z8LTSa9Hpgu1ldM9ZDRKGpviBM6a8,70097
|
|
13
13
|
kerykeion/charts/templates/chart.xml,sha256=4CJtMrPFYzgSC0hRjYd2ve53IZ5MKjfcRT8GUI0v_Fo,73767
|
|
14
14
|
kerykeion/charts/templates/wheel_only.xml,sha256=wna68vE2OtpwBBtpJteNRwYcyqqF0-SicXsR1PpCjtU,71310
|
|
@@ -18,25 +18,25 @@ kerykeion/charts/themes/dark.css,sha256=ml2lnzQVuS5DhCdoeUrDmMv9kB1nNceRt7hHbOHS
|
|
|
18
18
|
kerykeion/charts/themes/light.css,sha256=ALf5U8tQsb6ky0N9R7ZLOHDrfKEXNM-sBR3JIRxFrCI,6092
|
|
19
19
|
kerykeion/enums.py,sha256=gzB_GDDLGurQI24L0Ga0xpL3DoU6E4ld-gC2xMeLmC8,1077
|
|
20
20
|
kerykeion/ephemeris_data.py,sha256=g52P0jc1Roo8udXW04BOtIBTaOh3Rcp8_ZDw2MJNn_k,8072
|
|
21
|
-
kerykeion/fetch_geonames.py,sha256=
|
|
22
|
-
kerykeion/kr_types/__init__.py,sha256
|
|
21
|
+
kerykeion/fetch_geonames.py,sha256=e66Nh6yq9A4VjnuvVSiV1TW1IkJ9m3Q2LKPWrkOGgO0,4764
|
|
22
|
+
kerykeion/kr_types/__init__.py,sha256=jshJOccCQcYZuoOvrILRZH6imy4RBvKpFPujlNLFyGE,295
|
|
23
23
|
kerykeion/kr_types/chart_types.py,sha256=OlDvjCra7acaBT--B_gqsqOcAwbuKCXmQQyDTDNfy4o,1983
|
|
24
|
-
kerykeion/kr_types/kerykeion_exception.py,sha256=
|
|
25
|
-
kerykeion/kr_types/kr_literals.py,sha256=
|
|
26
|
-
kerykeion/kr_types/kr_models.py,sha256=
|
|
27
|
-
kerykeion/kr_types/settings_models.py,sha256=
|
|
24
|
+
kerykeion/kr_types/kerykeion_exception.py,sha256=kE1y0K0rmuz32b4K_ZppSsZ59I2Get0ZkvOkTE5HejI,314
|
|
25
|
+
kerykeion/kr_types/kr_literals.py,sha256=LW5OED0FgDNq5PPHW3_zVot4esz1Y8hCM2nJbgIQDF4,3638
|
|
26
|
+
kerykeion/kr_types/kr_models.py,sha256=3zRhQ17sWDPN1t5k-GV8VT7Hr2K7mYV8tec6VqMZWig,4314
|
|
27
|
+
kerykeion/kr_types/settings_models.py,sha256=oG0fbN9aXzdeBWRKXxy15TFXMR3bU2Be0Ze-wfZi59w,11863
|
|
28
28
|
kerykeion/relationship_score/__init__.py,sha256=cLaEBQXQBfyRkv0OaS3ceLROzvWcvKXWiRq0PS6LDjY,114
|
|
29
|
-
kerykeion/relationship_score/relationship_score.py,sha256=
|
|
30
|
-
kerykeion/relationship_score/relationship_score_factory.py,sha256=
|
|
29
|
+
kerykeion/relationship_score/relationship_score.py,sha256=lJkSbHw9nOUaPMrPxqcGhnVQIwAgI52K8BQzXXswb6A,6504
|
|
30
|
+
kerykeion/relationship_score/relationship_score_factory.py,sha256=9iqKHyMS9u9mSc8Ub1CHTDfifxBE40qs7PgbtGt7Gxc,10865
|
|
31
31
|
kerykeion/report.py,sha256=QEZfadIxmqIugoLHMW0KBhOqCwTywGSDDfpX4NJD6qg,2785
|
|
32
32
|
kerykeion/settings/__init__.py,sha256=QQNFCl7sgN27MKaVscqtpPk10HGz4wZS3I_7KEGMaVA,69
|
|
33
|
-
kerykeion/settings/kerykeion_settings.py,sha256=
|
|
33
|
+
kerykeion/settings/kerykeion_settings.py,sha256=WZyiC4uwpjnTmoDGWORYLIk9rIpJ3EuLdjFw6eUuylo,2554
|
|
34
34
|
kerykeion/settings/kr.config.json,sha256=635bN5jmcj_MzSiGFohuCzRYIUXY0lDMc0ng5f_Egus,21694
|
|
35
35
|
kerykeion/sweph/README.md,sha256=L7FtNAJTWtrZNGKa8MX87SjduFYPYxwWhaI5fmtzNZo,73
|
|
36
36
|
kerykeion/sweph/seas_18.se1,sha256=X9nCqhZU43wJpq61WAdueVQJt9xL2UjrwPqn1Kdoa1s,223002
|
|
37
37
|
kerykeion/utilities.py,sha256=4b1QgUR3Z1iFel4FHPPp5Qe2EbPCGQukMqCaW0Y_K6s,9417
|
|
38
|
-
kerykeion-4.
|
|
39
|
-
kerykeion-4.
|
|
40
|
-
kerykeion-4.
|
|
41
|
-
kerykeion-4.
|
|
42
|
-
kerykeion-4.
|
|
38
|
+
kerykeion-4.21.0.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
|
|
39
|
+
kerykeion-4.21.0.dist-info/METADATA,sha256=OZyrGRaT8amESSi7HEXrgKpV0Yrd0TWEvNihdmPV_tE,17667
|
|
40
|
+
kerykeion-4.21.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
41
|
+
kerykeion-4.21.0.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
|
|
42
|
+
kerykeion-4.21.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|