kerykeion 4.10.0__tar.gz → 4.10.1__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 (30) hide show
  1. {kerykeion-4.10.0 → kerykeion-4.10.1}/PKG-INFO +20 -8
  2. {kerykeion-4.10.0 → kerykeion-4.10.1}/README.md +17 -5
  3. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/__init__.py +13 -6
  4. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/astrological_subject.py +15 -7
  5. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/kr_types/kr_models.py +2 -1
  6. {kerykeion-4.10.0 → kerykeion-4.10.1}/pyproject.toml +5 -5
  7. {kerykeion-4.10.0 → kerykeion-4.10.1}/LICENSE +0 -0
  8. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/aspects/__init__.py +0 -0
  9. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/aspects/aspects_utils.py +0 -0
  10. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/aspects/natal_aspects.py +0 -0
  11. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/aspects/synastry_aspects.py +0 -0
  12. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/charts/__init__.py +0 -0
  13. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/charts/charts_utils.py +0 -0
  14. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/charts/kerykeion_chart_svg.py +0 -0
  15. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/charts/templates/chart.xml +0 -0
  16. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/enums.py +0 -0
  17. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/fetch_geonames.py +0 -0
  18. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/kr_types/__init__.py +0 -0
  19. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/kr_types/chart_types.py +0 -0
  20. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/kr_types/kerykeion_exception.py +0 -0
  21. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/kr_types/kr_literals.py +0 -0
  22. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/kr_types/settings_models.py +0 -0
  23. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/relationship_score.py +0 -0
  24. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/report.py +0 -0
  25. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/settings/__init__.py +0 -0
  26. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/settings/kerykeion_settings.py +0 -0
  27. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/settings/kr.config.json +0 -0
  28. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/sweph/README.md +0 -0
  29. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/sweph/seas_18.se1 +0 -0
  30. {kerykeion-4.10.0 → kerykeion-4.10.1}/kerykeion/utilities.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kerykeion
3
- Version: 4.10.0
3
+ Version: 4.10.1
4
4
  Summary: A python library for astrology.
5
5
  Home-page: https://github.com/g-battaglia/kerykeion
6
6
  License: AGPL-3.0
@@ -28,8 +28,8 @@ Classifier: Typing :: Typed
28
28
  Requires-Dist: pydantic (>=2.5,<3.0)
29
29
  Requires-Dist: pyswisseph (>=2.10.3.1,<3.0.0.0)
30
30
  Requires-Dist: pytz (>=2022.7,<2023.0)
31
- Requires-Dist: requests (>=2.28.1,<3.0.0)
32
- Requires-Dist: requests-cache (>=0.9.7,<0.10.0)
31
+ Requires-Dist: requests (>=2.32.3,<3.0.0)
32
+ Requires-Dist: requests-cache (>=1.2.1,<2.0.0)
33
33
  Requires-Dist: scour (>=0.38.2,<0.39.0)
34
34
  Requires-Dist: terminaltables (>=3.1.10,<4.0.0)
35
35
  Project-URL: Repository, https://github.com/g-battaglia/kerykeion
@@ -48,7 +48,7 @@ Description-Content-Type: text/markdown
48
48
  </a>
49
49
  <a href="https://pypi.org/project/kerykeion" target="_blank">
50
50
  <img src="https://visitor-badge.laobi.icu/badge?page_id=g-battaglia.kerykeion" alt="visitors"/>
51
- </a>
51
+ </a>
52
52
  <a href="https://pypi.org/project/kerykeion" target="_blank">
53
53
  <img src="https://img.shields.io/pypi/v/kerykeion?label=pypi%20package" alt="Package version">
54
54
  </a>
@@ -137,7 +137,7 @@ kanye = AstrologicalSubject(
137
137
  The difference is that you have to pass the longitude, latitude and the timezone string, instead of the city and nation.
138
138
  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.
139
139
 
140
- ## Generate a SVG Chart:
140
+ ## Generate a SVG Chart
141
141
 
142
142
  ```python
143
143
  from kerykeion import AstrologicalSubject, KerykeionChartSVG
@@ -176,7 +176,7 @@ report.print_report()
176
176
 
177
177
  Returns:
178
178
 
179
- ```
179
+ ```bash
180
180
  +- Kerykeion report for Kanye -+
181
181
  +----------+------+-------------+-----------+----------+
182
182
  | Date | Time | Location | Longitude | Latitude |
@@ -222,7 +222,7 @@ Returns:
222
222
  And if you want to export it to a file:
223
223
 
224
224
  ```bash
225
- $ python3 your_script_name.py > file.txt
225
+ python3 your_script_name.py > file.txt
226
226
  ```
227
227
 
228
228
  ## Other exeples of possibles usecase
@@ -244,6 +244,18 @@ print(aspect_list[0])
244
244
 
245
245
  ```
246
246
 
247
+ ## Ayanamsa (Sidereal Modes)
248
+
249
+ You can set the zodiac type and the sidereal mode in the AstrologicalSubject class:
250
+
251
+ ```python
252
+ johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
253
+ ```
254
+
255
+ More examples [here](https://www.kerykeion.net/docs/examples/sidereal-modes/).
256
+
257
+ Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#SiderealMode).
258
+
247
259
  ## Documentation
248
260
 
249
261
  Most of the functions and the classes are self documented by the types and have docstrings.
@@ -266,5 +278,5 @@ To understand how this impacts your use of the software, please see the [LICENSE
266
278
  If you have questions, you can reach out to me at my [email](mailto:battaglia.giacomo@yahoo.it?subject=Kerykeion) address.
267
279
  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.
268
280
 
269
- You can implement the logic of kerkeion 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.
281
+ 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.
270
282
 
@@ -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>
@@ -100,7 +100,7 @@ kanye = AstrologicalSubject(
100
100
  The difference is that you have to pass the longitude, latitude and the timezone string, instead of the city and nation.
101
101
  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.
102
102
 
103
- ## Generate a SVG Chart:
103
+ ## Generate a SVG Chart
104
104
 
105
105
  ```python
106
106
  from kerykeion import AstrologicalSubject, KerykeionChartSVG
@@ -139,7 +139,7 @@ report.print_report()
139
139
 
140
140
  Returns:
141
141
 
142
- ```
142
+ ```bash
143
143
  +- Kerykeion report for Kanye -+
144
144
  +----------+------+-------------+-----------+----------+
145
145
  | Date | Time | Location | Longitude | Latitude |
@@ -185,7 +185,7 @@ Returns:
185
185
  And if you want to export it to a file:
186
186
 
187
187
  ```bash
188
- $ python3 your_script_name.py > file.txt
188
+ python3 your_script_name.py > file.txt
189
189
  ```
190
190
 
191
191
  ## Other exeples of possibles usecase
@@ -207,6 +207,18 @@ print(aspect_list[0])
207
207
 
208
208
  ```
209
209
 
210
+ ## Ayanamsa (Sidereal Modes)
211
+
212
+ You can set the zodiac type and the sidereal mode in the AstrologicalSubject class:
213
+
214
+ ```python
215
+ johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
216
+ ```
217
+
218
+ More examples [here](https://www.kerykeion.net/docs/examples/sidereal-modes/).
219
+
220
+ Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#SiderealMode).
221
+
210
222
  ## Documentation
211
223
 
212
224
  Most of the functions and the classes are self documented by the types and have docstrings.
@@ -229,4 +241,4 @@ To understand how this impacts your use of the software, please see the [LICENSE
229
241
  If you have questions, you can reach out to me at my [email](mailto:battaglia.giacomo@yahoo.it?subject=Kerykeion) address.
230
242
  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.
231
243
 
232
- You can implement the logic of kerkeion 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.
244
+ 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.
@@ -13,7 +13,7 @@
13
13
  </a>
14
14
  <a href="https://pypi.org/project/kerykeion" target="_blank">
15
15
  <img src="https://visitor-badge.laobi.icu/badge?page_id=g-battaglia.kerykeion" alt="visitors"/>
16
- </a>
16
+ </a>
17
17
  <a href="https://pypi.org/project/kerykeion" target="_blank">
18
18
  <img src="https://img.shields.io/pypi/v/kerykeion?label=pypi%20package" alt="Package version">
19
19
  </a>
@@ -102,7 +102,7 @@ kanye = AstrologicalSubject(
102
102
  The difference is that you have to pass the longitude, latitude and the timezone string, instead of the city and nation.
103
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.
104
104
 
105
- ## Generate a SVG Chart:
105
+ ## Generate a SVG Chart
106
106
 
107
107
  ```python
108
108
  from kerykeion import AstrologicalSubject, KerykeionChartSVG
@@ -141,7 +141,7 @@ report.print_report()
141
141
 
142
142
  Returns:
143
143
 
144
- ```
144
+ ```bash
145
145
  +- Kerykeion report for Kanye -+
146
146
  +----------+------+-------------+-----------+----------+
147
147
  | Date | Time | Location | Longitude | Latitude |
@@ -187,7 +187,7 @@ Returns:
187
187
  And if you want to export it to a file:
188
188
 
189
189
  ```bash
190
- $ python3 your_script_name.py > file.txt
190
+ python3 your_script_name.py > file.txt
191
191
  ```
192
192
 
193
193
  ## Other exeples of possibles usecase
@@ -209,6 +209,14 @@ print(aspect_list[0])
209
209
 
210
210
  ```
211
211
 
212
+ ## Ayanamsa (Sidereal Modes)
213
+
214
+ You can set the zodiac type and the sidereal mode in the AstrologicalSubject class:
215
+
216
+ ```python
217
+ johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
218
+ ```
219
+
212
220
  ## Documentation
213
221
 
214
222
  Most of the functions and the classes are self documented by the types and have docstrings.
@@ -231,8 +239,7 @@ To understand how this impacts your use of the software, please see the [LICENSE
231
239
  If you have questions, you can reach out to me at my [email](mailto:battaglia.giacomo@yahoo.it?subject=Kerykeion) address.
232
240
  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.
233
241
 
234
- You can implement the logic of kerkeion 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.
235
-
242
+ 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.
236
243
  """
237
244
 
238
245
  # Local
@@ -26,7 +26,7 @@ from kerykeion.utilities import (
26
26
  get_moon_phase_name_from_phase_int,
27
27
  )
28
28
  from pathlib import Path
29
- from typing import Union
29
+ from typing import Union, get_args
30
30
 
31
31
  DEFAULT_GEONAMES_USERNAME = "century.boy"
32
32
  DEFAULT_SIDEREAL_MODE = "FAGAN_BRADLEY"
@@ -177,7 +177,10 @@ class AstrologicalSubject:
177
177
  self.disable_chiron = disable_chiron
178
178
  self.sidereal_mode = sidereal_mode
179
179
 
180
- # Sidereal mode check and setup --->
180
+ # Zodiac Type and Sidereal mode checks and setup --->
181
+ if zodiac_type and not zodiac_type in get_args(ZodiacType):
182
+ raise KerykeionException(f"\n* ERROR: '{zodiac_type}' is NOT a valid zodiac type! Available types are: *" + "\n" + str(get_args(ZodiacType)))
183
+
181
184
  if self.sidereal_mode and self.zodiac_type == "Tropic":
182
185
  raise KerykeionException("You can't set a sidereal mode with a Tropic zodiac type!")
183
186
 
@@ -186,11 +189,15 @@ class AstrologicalSubject:
186
189
  logging.info("No sidereal mode set, using default FAGAN_BRADLEY")
187
190
 
188
191
  if self.zodiac_type == "Sidereal":
192
+ # Check if the sidereal mode is valid
193
+ if not self.sidereal_mode in get_args(SiderealMode):
194
+ raise KerykeionException(f"\n* ERROR: '{self.sidereal_mode}' is NOT a valid sidereal mode! Available modes are: *" + "\n" + str(get_args(SiderealMode)))
195
+
189
196
  self._iflag += swe.FLG_SIDEREAL
190
- mode = "SIDM_" + sidereal_mode
197
+ mode = "SIDM_" + self.sidereal_mode
191
198
  swe.set_sid_mode(getattr(swe, mode))
192
199
  logging.debug(f"Using sidereal mode: {mode}")
193
- # <--- Sidereal mode check and setup
200
+ # <--- Zodiac Type and Sidereal mode checks and setup
194
201
 
195
202
  # This message is set to encourage the user to set a custom geonames username
196
203
  if geonames_username is None and online:
@@ -581,7 +588,7 @@ class AstrologicalSubject:
581
588
  self.lat = -66.0
582
589
  logging.info("Polar circle override for houses, using -66 degrees")
583
590
 
584
- def json(self, dump=False, destination_folder: Union[str, None] = None) -> str:
591
+ def json(self, dump=False, destination_folder: Union[str, None] = None, indent: Union[int, None] = None) -> str:
585
592
  """
586
593
  Dumps the Kerykeion object to a json string foramt,
587
594
  if dump=True also dumps to file located in destination
@@ -589,7 +596,7 @@ class AstrologicalSubject:
589
596
  """
590
597
 
591
598
  KrData = AstrologicalSubjectModel(**self.__dict__)
592
- json_string = KrData.model_dump_json(exclude_none=True)
599
+ json_string = KrData.model_dump_json(exclude_none=True, indent=indent)
593
600
 
594
601
  if dump:
595
602
  if destination_folder:
@@ -634,4 +641,5 @@ if __name__ == "__main__":
634
641
  print(johnny.chiron)
635
642
 
636
643
  # With Sidereal Zodiac
637
- johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="FAGAN_BRADLEY")
644
+ johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
645
+ print(johnny.json(dump=True, indent=2))
@@ -7,7 +7,7 @@
7
7
  from typing import Union, Optional
8
8
  from pydantic import BaseModel
9
9
 
10
- from kerykeion.kr_types import LunarPhaseEmoji, LunarPhaseName, Planet, Houses, Quality, Element, Sign, ZodiacType, SignNumbers, HouseNumbers, PointType
10
+ from kerykeion.kr_types import LunarPhaseEmoji, LunarPhaseName, Planet, Houses, Quality, Element, Sign, ZodiacType, SignNumbers, HouseNumbers, PointType, SiderealMode
11
11
 
12
12
  class SubscriptableBaseModel(BaseModel):
13
13
  """
@@ -65,6 +65,7 @@ class AstrologicalSubjectModel(SubscriptableBaseModel):
65
65
  lat: float
66
66
  tz_str: str
67
67
  zodiac_type: ZodiacType
68
+ sidereal_mode: Union[SiderealMode, None]
68
69
  local_time: float
69
70
  utc_time: float
70
71
  julian_day: float
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "kerykeion"
3
- version = "4.10.0"
3
+ version = "4.10.1"
4
4
  authors = ["Giacomo Battaglia <battaglia.giacomo@yahoo.it>"]
5
5
  description = "A python library for astrology."
6
6
  license = "AGPL-3.0"
@@ -44,11 +44,11 @@ packages = [{ include = "kerykeion" }]
44
44
  python = "^3.9"
45
45
  pyswisseph = "^2.10.3.1"
46
46
  pytz = "^2022.7"
47
- requests = "^2.28.1"
48
- requests-cache = "^0.9.7"
49
47
  pydantic = "^2.5"
50
48
  terminaltables = "^3.1.10"
51
49
  scour = "^0.38.2"
50
+ requests-cache = "^1.2.1"
51
+ requests = "^2.32.3"
52
52
 
53
53
  [tool.poetry.scripts]
54
54
  create-docs = "scripts.docs:main"
@@ -56,7 +56,7 @@ create-docs = "scripts.docs:main"
56
56
  [tool.poetry.group.dev.dependencies]
57
57
  pytest = "^7.2.0"
58
58
  mypy = "^0.991"
59
- black = "^22.12.0"
59
+ black = "^24.4.2"
60
60
  pdoc = "^14.5.0"
61
61
  types-requests = "^2.28.11.7"
62
62
  types-pytz = "^2022.7.0.0"
@@ -65,7 +65,7 @@ poethepoet = "^0.19.0"
65
65
  # MyPy Static Analysis
66
66
  [tool.mypy]
67
67
  ignore_missing_imports = true
68
- mypy_path = "kerkeion"
68
+ mypy_path = "kerykeion"
69
69
  files = "kerykeion"
70
70
 
71
71
  # PyTest Automated Testing
File without changes