kerykeion 4.20.0__tar.gz → 4.21.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 (40) hide show
  1. {kerykeion-4.20.0 → kerykeion-4.21.0}/PKG-INFO +1 -1
  2. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/__init__.py +1 -1
  3. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/aspects/__init__.py +2 -2
  4. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/aspects/aspects_utils.py +1 -1
  5. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/aspects/natal_aspects.py +1 -1
  6. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/aspects/synastry_aspects.py +1 -1
  7. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/astrological_subject.py +6 -1
  8. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/charts/__init__.py +2 -2
  9. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/charts/kerykeion_chart_svg.py +1 -1
  10. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/fetch_geonames.py +8 -5
  11. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/kr_types/__init__.py +1 -1
  12. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/kr_types/kerykeion_exception.py +1 -1
  13. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/kr_types/kr_literals.py +1 -1
  14. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/kr_types/kr_models.py +1 -1
  15. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/kr_types/settings_models.py +1 -1
  16. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/relationship_score/relationship_score.py +1 -1
  17. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/relationship_score/relationship_score_factory.py +1 -1
  18. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/settings/kerykeion_settings.py +1 -1
  19. {kerykeion-4.20.0 → kerykeion-4.21.0}/pyproject.toml +1 -1
  20. {kerykeion-4.20.0 → kerykeion-4.21.0}/LICENSE +0 -0
  21. {kerykeion-4.20.0 → kerykeion-4.21.0}/README.md +0 -0
  22. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/charts/charts_utils.py +0 -0
  23. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/charts/draw_planets.py +0 -0
  24. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/charts/templates/aspect_grid_only.xml +0 -0
  25. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/charts/templates/chart.xml +0 -0
  26. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/charts/templates/wheel_only.xml +0 -0
  27. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/charts/themes/classic.css +0 -0
  28. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/charts/themes/dark-high-contrast.css +0 -0
  29. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/charts/themes/dark.css +0 -0
  30. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/charts/themes/light.css +0 -0
  31. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/enums.py +0 -0
  32. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/ephemeris_data.py +0 -0
  33. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/kr_types/chart_types.py +0 -0
  34. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/relationship_score/__init__.py +0 -0
  35. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/report.py +0 -0
  36. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/settings/__init__.py +0 -0
  37. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/settings/kr.config.json +0 -0
  38. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/sweph/README.md +0 -0
  39. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/sweph/seas_18.se1 +0 -0
  40. {kerykeion-4.20.0 → kerykeion-4.21.0}/kerykeion/utilities.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kerykeion
3
- Version: 4.20.0
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
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
3
+ This is part of Kerykeion (C) 2025 Giacomo Battaglia
4
4
 
5
5
  .. include:: ../README.md
6
6
  """
@@ -1,8 +1,8 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
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) 2024 Giacomo Battaglia
3
+ This is part of Kerykeion (C) 2025 Giacomo Battaglia
4
4
  """
5
5
  # TODO: Better documentation and unit tests
6
6
 
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
3
+ This is part of Kerykeion (C) 2025 Giacomo Battaglia
4
4
  """
5
5
 
6
6
  from pathlib import Path
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
3
+ This is part of Kerykeion (C) 2025 Giacomo Battaglia
4
4
  """
5
5
 
6
6
  from kerykeion import AstrologicalSubject
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
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
 
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  """
2
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
2
+ This is part of Kerykeion (C) 2025 Giacomo Battaglia
3
3
 
4
4
  This modules contains the charts logic for the Kerykeion project.
5
- """
5
+ """
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
3
+ This is part of Kerykeion (C) 2025 Giacomo Battaglia
4
4
  """
5
5
 
6
6
 
@@ -1,10 +1,11 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
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=86400,
35
+ expire_after=timedelta(days=cache_expire_after_days),
33
36
  )
34
37
 
35
38
  self.username = username
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
3
+ This is part of Kerykeion (C) 2025 Giacomo Battaglia
4
4
  """
5
5
 
6
6
  from .kerykeion_exception import KerykeionException
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
3
+ This is part of Kerykeion (C) 2025 Giacomo Battaglia
4
4
  """
5
5
 
6
6
 
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
3
+ This is part of Kerykeion (C) 2025 Giacomo Battaglia
4
4
  """
5
5
  from typing import Literal
6
6
 
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
3
+ This is part of Kerykeion (C) 2025 Giacomo Battaglia
4
4
  """
5
5
 
6
6
 
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
3
+ This is part of Kerykeion (C) 2025 Giacomo Battaglia
4
4
  """
5
5
 
6
6
 
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
3
+ This is part of Kerykeion (C) 2025 Giacomo Battaglia
4
4
  """
5
5
 
6
6
  from kerykeion import AstrologicalSubject
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
3
+ This is part of Kerykeion (C) 2025 Giacomo Battaglia
4
4
  """
5
5
 
6
6
  from kerykeion import AstrologicalSubject
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
3
+ This is part of Kerykeion (C) 2025 Giacomo Battaglia
4
4
  """
5
5
 
6
6
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "kerykeion"
3
- version = "4.20.0"
3
+ version = "4.21.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
File without changes