kerykeion 4.10.1__py3-none-any.whl → 4.11.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 CHANGED
@@ -126,7 +126,7 @@ print(len(name.aspects_list))
126
126
 
127
127
  ![Synastry Chart](http://centuryboy.altervista.org/JackComposite_Chart.svg)
128
128
 
129
- # Report
129
+ ## Report
130
130
 
131
131
  To print a report of all the data:
132
132
 
@@ -217,6 +217,10 @@ You can set the zodiac type and the sidereal mode in the AstrologicalSubject cla
217
217
  johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
218
218
  ```
219
219
 
220
+ More examples [here](https://www.kerykeion.net/docs/examples/sidereal-modes/).
221
+
222
+ Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#SiderealMode).
223
+
220
224
  ## Documentation
221
225
 
222
226
  Most of the functions and the classes are self documented by the types and have docstrings.
@@ -16,7 +16,8 @@ from kerykeion.kr_types import (
16
16
  LunarPhaseModel,
17
17
  KerykeionPointModel,
18
18
  PointType,
19
- SiderealMode
19
+ SiderealMode,
20
+ HousesSystemIdentifier
20
21
  )
21
22
  from kerykeion.utilities import (
22
23
  get_number_from_name,
@@ -30,6 +31,7 @@ from typing import Union, get_args
30
31
 
31
32
  DEFAULT_GEONAMES_USERNAME = "century.boy"
32
33
  DEFAULT_SIDEREAL_MODE = "FAGAN_BRADLEY"
34
+ DEFAULT_HOUSES_SYSTEM = "P"
33
35
 
34
36
 
35
37
  class AstrologicalSubject:
@@ -65,6 +67,7 @@ class AstrologicalSubject:
65
67
  The mode to use for the sidereal zodiac, according to the Swiss Ephemeris.
66
68
  Defaults to "FAGAN_BRADLEY".
67
69
  Available modes are visible in the SiderealMode Literal.
70
+ - houses_system_identifier (HousesSystemIdentifier, optional): The system to use for the calculation of the houses.
68
71
  """
69
72
 
70
73
  # Defined by the user
@@ -84,6 +87,8 @@ class AstrologicalSubject:
84
87
  online: bool
85
88
  zodiac_type: ZodiacType
86
89
  sidereal_mode: SiderealMode
90
+ houses_system_identifier: HousesSystemIdentifier
91
+ houses_system_name: str
87
92
 
88
93
  # Generated internally
89
94
  city_data: dict[str, str]
@@ -148,7 +153,8 @@ class AstrologicalSubject:
148
153
  online: bool = True,
149
154
  utc_datetime: Union[datetime, None] = None,
150
155
  disable_chiron: bool = False,
151
- sidereal_mode: Union[SiderealMode, None] = None
156
+ sidereal_mode: Union[SiderealMode, None] = None,
157
+ houses_system_identifier: HousesSystemIdentifier = DEFAULT_HOUSES_SYSTEM
152
158
  ) -> None:
153
159
  logging.debug("Starting Kerykeion")
154
160
 
@@ -176,6 +182,14 @@ class AstrologicalSubject:
176
182
  self.utc_datetime = utc_datetime
177
183
  self.disable_chiron = disable_chiron
178
184
  self.sidereal_mode = sidereal_mode
185
+ self.houses_system_identifier = houses_system_identifier
186
+
187
+ # House System check and setup --->
188
+ if self.houses_system_identifier not in get_args(HousesSystemIdentifier):
189
+ raise KerykeionException(f"\n* ERROR: '{self.houses_system_identifier}' is NOT a valid house system! Available systems are: *" + "\n" + str(get_args(HousesSystemIdentifier)))
190
+
191
+ self.houses_system_name = swe.house_name(self.houses_system_identifier.encode('ascii'))
192
+ # <--- House System check and setup
179
193
 
180
194
  # Zodiac Type and Sidereal mode checks and setup --->
181
195
  if zodiac_type and not zodiac_type in get_args(ZodiacType):
@@ -350,11 +364,17 @@ class AstrologicalSubject:
350
364
 
351
365
  if self.zodiac_type == "Sidereal":
352
366
  self.houses_degree_ut = swe.houses_ex(
353
- tjdut=self.julian_day, lat=self.lat, lon=self.lng, hsys=str.encode('P'), flags=swe.FLG_SIDEREAL
367
+ tjdut=self.julian_day,
368
+ lat=self.lat, lon=self.lng,
369
+ hsys=str.encode(self.houses_system_identifier),
370
+ flags=swe.FLG_SIDEREAL
354
371
  )[0]
372
+
355
373
  elif self.zodiac_type == "Tropic":
356
374
  self.houses_degree_ut = swe.houses(
357
- tjdut=self.julian_day, lat=self.lat, lon=self.lng, hsys=str.encode('P')
375
+ tjdut=self.julian_day, lat=self.lat,
376
+ lon=self.lng,
377
+ hsys=str.encode(self.houses_system_identifier)
358
378
  )[0]
359
379
 
360
380
  point_type: PointType = "House"
@@ -643,3 +663,7 @@ if __name__ == "__main__":
643
663
  # With Sidereal Zodiac
644
664
  johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
645
665
  print(johnny.json(dump=True, indent=2))
666
+
667
+ # With Morinus Houses
668
+ johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", houses_system_identifier="M")
669
+ print(johnny.json(dump=True, indent=2))
@@ -1234,13 +1234,15 @@ class KerykeionChartSVG:
1234
1234
 
1235
1235
  # Bottom Left Corner
1236
1236
  if self.chart_type == "Natal" or self.chart_type == "ExternalNatal" or self.chart_type == "Synastry":
1237
- td["bottomLeft1"] = f"{self.user.zodiac_type if self.user.zodiac_type == 'Tropic' else self.user.zodiac_type + ' ' + self.user.sidereal_mode}"
1237
+ td["bottomLeft0"] = f"{self.user.zodiac_type if self.user.zodiac_type == 'Tropic' else self.user.zodiac_type + ' ' + self.user.sidereal_mode}"
1238
+ td["bottomLeft1"] = f"{self.user.houses_system_name}"
1238
1239
  td["bottomLeft2"] = f'{self.language_settings.get("lunar_phase", "Lunar Phase")}: {self.user.lunar_phase.moon_phase_name}'
1239
1240
  td["bottomLeft3"] = f'{self.language_settings.get("lunar_phase", "Lunar Phase")}: {self.language_settings.get("day", "Day")} {self.user.lunar_phase.get("moon_phase", "")}'
1240
1241
  td["bottomLeft4"] = ""
1241
1242
 
1242
1243
  else:
1243
- td["bottomLeft1"] = f"{self.user.zodiac_type if self.user.zodiac_type == 'Tropic' else self.user.zodiac_type + ' ' + self.user.sidereal_mode}"
1244
+ td["bottomLeft0"] = f"{self.user.zodiac_type if self.user.zodiac_type == 'Tropic' else self.user.zodiac_type + ' ' + self.user.sidereal_mode}"
1245
+ td["bottomLeft1"] = f"{self.user.houses_system_name}"
1244
1246
  td["bottomLeft2"] = f'{self.language_settings.get("lunar_phase", "Lunar Phase")}: {self.t_user.lunar_phase.moon_phase_name}'
1245
1247
  td["bottomLeft3"] = f'{self.language_settings.get("lunar_phase", "Lunar Phase")}: {self.language_settings.get("day", "Day")} {self.t_user.lunar_phase.get("moon_phase", "")}'
1246
1248
  td["bottomLeft4"] = ""
@@ -1456,3 +1458,16 @@ if __name__ == "__main__":
1456
1458
  sidereal_subject = AstrologicalSubject("John Lennon J2000", 1940, 10, 9, 10, 30, "Liverpool", "GB", zodiac_type="Sidereal", sidereal_mode="J2000")
1457
1459
  sidereal_chart = KerykeionChartSVG(sidereal_subject)
1458
1460
  sidereal_chart.makeSVG()
1461
+
1462
+ # House System Morinus
1463
+ morinus_house_subject = AstrologicalSubject("John Lennon - House System Morinus", 1940, 10, 9, 10, 30, "Liverpool", "GB", houses_system_identifier="M")
1464
+ morinus_house_chart = KerykeionChartSVG(morinus_house_subject)
1465
+ morinus_house_chart.makeSVG()
1466
+
1467
+ ## To check all the available house systems uncomment the following code:
1468
+ # from kerykeion.kr_types import HousesSystemIdentifier
1469
+ # from typing import get_args
1470
+ # for i in get_args(HousesSystemIdentifier):
1471
+ # alternatives_house_subject = AstrologicalSubject(f"John Lennon - House System {i}", 1940, 10, 9, 10, 30, "Liverpool", "GB", houses_system=i)
1472
+ # alternatives_house_chart = KerykeionChartSVG(alternatives_house_subject)
1473
+ # alternatives_house_chart.makeSVG()
@@ -21,6 +21,7 @@
21
21
  <text x="20" y="86" style="fill: $paper_color_0; font-size: 11px">$stringLat</text>
22
22
  <text x="20" y="98" style="fill: $paper_color_0; font-size: 11px">$stringLon</text>
23
23
  <text x="20" y="110" style="fill: $paper_color_0; font-size: 11px">$stringPosition</text>
24
+ <text x="20" y="466" style="fill: $paper_color_0; font-size: 10px">$bottomLeft0</text>
24
25
  <text x="20" y="480" style="fill: $paper_color_0; font-size: 10px">$bottomLeft1</text>
25
26
  <text x="20" y="494" style="fill: $paper_color_0; font-size: 10px">$bottomLeft2</text>
26
27
  <text x="20" y="508" style="fill: $paper_color_0; font-size: 10px">$bottomLeft3</text>
@@ -20,6 +20,7 @@ class ChartTemplateDictionary(TypedDict):
20
20
  viewbox: str
21
21
  stringTitle: str
22
22
  stringName: str
23
+ bottomLeft0: str
23
24
  bottomLeft1: str
24
25
  bottomLeft2: str
25
26
  bottomLeft3: str
@@ -54,4 +54,36 @@ LunarPhaseName = Literal["New Moon", "Waxing Crescent", "First Quarter", "Waxing
54
54
 
55
55
 
56
56
  SiderealMode = Literal["FAGAN_BRADLEY", "LAHIRI", "DELUCE", "RAMAN", "USHASHASHI", "KRISHNAMURTI", "DJWHAL_KHUL", "YUKTESHWAR", "JN_BHASIN", "BABYL_KUGLER1", "BABYL_KUGLER2", "BABYL_KUGLER3", "BABYL_HUBER", "BABYL_ETPSC", "ALDEBARAN_15TAU", "HIPPARCHOS", "SASSANIAN", "J2000", "J1900", "B1950"]
57
- """Literal type for Sidereal Modes, as known as Ayanamsa"""
57
+ """Literal type for Sidereal Modes, as known as Ayanamsa"""
58
+
59
+
60
+ HousesSystemIdentifier = Literal["A", "B", "C", "D", "F", "H", "I", "i", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y"]
61
+ """
62
+ Literal type for Houses Systems:
63
+
64
+ A = equal
65
+ B = Alcabitius
66
+ C = Campanus
67
+ D = equal (MC)
68
+ F = Carter poli-equ.
69
+ H = horizon/azimut
70
+ I = Sunshine
71
+ i = Sunshine/alt.
72
+ K = Koch
73
+ L = Pullen SD
74
+ M = Morinus
75
+ N = equal/1=Aries
76
+ O = Porphyry
77
+ P = Placidus
78
+ Q = Pullen SR
79
+ R = Regiomontanus
80
+ S = Sripati
81
+ T = Polich/Page
82
+ U = Krusinski-Pisa-Goelzer
83
+ V = equal/Vehlow
84
+ W = equal/whole sign
85
+ X = axial rotation system/Meridian houses
86
+ Y = APC houses
87
+
88
+ Usually the standard is Placidus (P)
89
+ """
@@ -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, SiderealMode
10
+ from kerykeion.kr_types import LunarPhaseEmoji, LunarPhaseName, Planet, Houses, Quality, Element, Sign, ZodiacType, SignNumbers, HouseNumbers, PointType, SiderealMode, HousesSystemIdentifier
11
11
 
12
12
  class SubscriptableBaseModel(BaseModel):
13
13
  """
@@ -66,6 +66,8 @@ class AstrologicalSubjectModel(SubscriptableBaseModel):
66
66
  tz_str: str
67
67
  zodiac_type: ZodiacType
68
68
  sidereal_mode: Union[SiderealMode, None]
69
+ houses_system_identifier: HousesSystemIdentifier
70
+ houses_system_name: str
69
71
  local_time: float
70
72
  utc_time: float
71
73
  julian_day: float
kerykeion/utilities.py CHANGED
@@ -285,7 +285,7 @@ def get_planet_house(planet_position_degree: Union[int, float], houses_degree_ut
285
285
  elif check_if_point_between(houses_degree_ut_list[11], houses_degree_ut_list[0], planet_position_degree) == True:
286
286
  house = "Twelfth_House"
287
287
  else:
288
- raise ValueError("Error in house calculation, planet: ", planet_position_degree)
288
+ raise ValueError("Error in house calculation, planet: ", planet_position_degree, "houses: ", houses_degree_ut_list)
289
289
 
290
290
  return house
291
291
 
@@ -353,4 +353,4 @@ def get_moon_phase_name_from_phase_int(phase: int) -> LunarPhaseName:
353
353
  else:
354
354
  raise KerykeionException(f"Error in moon name calculation! Phase: {phase}")
355
355
 
356
- return result
356
+ return result
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kerykeion
3
- Version: 4.10.1
3
+ Version: 4.11.0
4
4
  Summary: A python library for astrology.
5
5
  Home-page: https://github.com/g-battaglia/kerykeion
6
6
  License: AGPL-3.0
@@ -161,7 +161,7 @@ print(len(name.aspects_list))
161
161
 
162
162
  ![Synastry Chart](http://centuryboy.altervista.org/JackComposite_Chart.svg)
163
163
 
164
- # Report
164
+ ## Report
165
165
 
166
166
  To print a report of all the data:
167
167
 
@@ -176,7 +176,7 @@ report.print_report()
176
176
 
177
177
  Returns:
178
178
 
179
- ```bash
179
+ ```txt
180
180
  +- Kerykeion report for Kanye -+
181
181
  +----------+------+-------------+-----------+----------+
182
182
  | Date | Time | Location | Longitude | Latitude |
@@ -256,6 +256,20 @@ More examples [here](https://www.kerykeion.net/docs/examples/sidereal-modes/).
256
256
 
257
257
  Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#SiderealMode).
258
258
 
259
+ ## Houses Systems
260
+
261
+ You can set the houses system in the AstrologicalSubject class:
262
+
263
+ ```python
264
+ johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", houses_system="M")
265
+ ```
266
+
267
+ More examples [here](https://www.kerykeion.net/docs/examples/house-systems/).
268
+
269
+ Full list of supported house systems [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#HousesSystem).
270
+
271
+ So far all the available houses system in the Swiss Ephemeris are supported but the Gauquelin Sectors.
272
+
259
273
  ## Documentation
260
274
 
261
275
  Most of the functions and the classes are self documented by the types and have docstrings.
@@ -1,21 +1,21 @@
1
1
  LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
2
- kerykeion/__init__.py,sha256=9BqSYounDLNO07ajTAaqB5gZJH63Xt7QAxeh4g_d09A,9306
2
+ kerykeion/__init__.py,sha256=s1o1Y29ZdIPCrbXPDygQGNhRHDGh7xi1gHrONGAPxrQ,9517
3
3
  kerykeion/aspects/__init__.py,sha256=9FlDVI1ndCJga0-chNIhcLitjU_x3kbtAFfFqVp2ejc,293
4
4
  kerykeion/aspects/aspects_utils.py,sha256=Rdo3ITDSU80n6U7aazpzzK4ruv7Iui2PaI3zMGqu1NQ,5832
5
5
  kerykeion/aspects/natal_aspects.py,sha256=m3_v1dM6YXvENZ6iN_EJkikKxySZBeR5QKhGsaChERk,4507
6
6
  kerykeion/aspects/synastry_aspects.py,sha256=uwg7Lc7wKnpxW9ydOdBHqx9cvO_t0ydGfIGluBIDD7c,3993
7
- kerykeion/astrological_subject.py,sha256=ECUkDb4TafAIN3s771YoZPW1thiMCXb3wu9aSa1IdIg,24426
7
+ kerykeion/astrological_subject.py,sha256=GSYq3f5fBMgNlkbLgW6_hY_djmbZ3-HLMX8OiKlE7C4,25603
8
8
  kerykeion/charts/__init__.py,sha256=Juxkduy2TaagWblh_7CE8Acrg3dHL27-WEddJhau_eQ,127
9
9
  kerykeion/charts/charts_utils.py,sha256=Pfy-SkPnABIy5ZkKgypnGqxXOAKhTRIeQX3fQKO8DgQ,15065
10
- kerykeion/charts/kerykeion_chart_svg.py,sha256=5PtKiubdeR2hVo3DfxYTkdGvV4ajqKEAd9i3rMOPZYo,62739
11
- kerykeion/charts/templates/chart.xml,sha256=g8trrQdGj7Gw4B2uJS-cysyD8pf3cXA9rKF6fT75pEs,67615
10
+ kerykeion/charts/kerykeion_chart_svg.py,sha256=ECz_nTtNl5b2JeWnLAQSXFoCMILeFoI5wHfZetUceNw,63657
11
+ kerykeion/charts/templates/chart.xml,sha256=5LjTkvWU8_iafIIeHUYAVqh5bUyGzqXau09OLkuiduE,67714
12
12
  kerykeion/enums.py,sha256=Ben9GLYkPucpYY2ZDpURzUbNCc9jzK2MuaffkgiXFdQ,965
13
13
  kerykeion/fetch_geonames.py,sha256=ZWB1DbcH54ab3fQhzPhLY0Dz0OaPJqiHFn2e7DRr1MM,4588
14
14
  kerykeion/kr_types/__init__.py,sha256=-qhGQikurdoHnGtuT1bsaEeZ-IwmZtIHMjGOPC9_oqQ,295
15
- kerykeion/kr_types/chart_types.py,sha256=g9z53FTOsb2rusUG8nK4dtFgvVa6RCwAfAbrxFb9KaM,2180
15
+ kerykeion/kr_types/chart_types.py,sha256=qaZjm1rMpDDnUZlLjEihd9KPyv3PvrV8vkRmNBuRZzE,2201
16
16
  kerykeion/kr_types/kerykeion_exception.py,sha256=G-7VFta78qBt10l54JZWvwH-3lUNKmDwuILXaVGVu9A,314
17
- kerykeion/kr_types/kr_literals.py,sha256=bjv5TR7EX7yXx2hv4yn-639HEwm3EGZVGGdLc4jENsI,1997
18
- kerykeion/kr_types/kr_models.py,sha256=_BAW5moUJu4CWem1knwcyfnai6vkZZxnW8eJyu2azLY,3113
17
+ kerykeion/kr_types/kr_literals.py,sha256=Q9kfm2y3uwg3ZpEzIIrEpAC8X0BWYQjT0gy5iAKfAdc,2613
18
+ kerykeion/kr_types/kr_models.py,sha256=nP65w8_SC1iprYT3o7n4JknyafCD56SsAZKcgAHVN10,3218
19
19
  kerykeion/kr_types/settings_models.py,sha256=Gh467QjvlGmheD6eJI1IHpuK4cz_hbtjGTJT_1NMoAE,12376
20
20
  kerykeion/relationship_score.py,sha256=R9JugfK5_gJgr5ND-EghkqpqZcutzzKlJ-2JnYUMVv4,6794
21
21
  kerykeion/report.py,sha256=kS5avIN119pJVapYjZOvabg77nEcA8sSrOuXbRifABk,2565
@@ -24,9 +24,9 @@ kerykeion/settings/kerykeion_settings.py,sha256=uRAbhJ0ZXAbGBPGJjhh5u8YX2phcXobE
24
24
  kerykeion/settings/kr.config.json,sha256=1Yhv9RGHom5U9e-JZZRWVfT2Ubllz2WrckdwadDWfyg,12282
25
25
  kerykeion/sweph/README.md,sha256=L7FtNAJTWtrZNGKa8MX87SjduFYPYxwWhaI5fmtzNZo,73
26
26
  kerykeion/sweph/seas_18.se1,sha256=X9nCqhZU43wJpq61WAdueVQJt9xL2UjrwPqn1Kdoa1s,223002
27
- kerykeion/utilities.py,sha256=Sb-EdrgvyGgLNxFUNWaMr4DBTbvyTkZjXR_c0ouTCj0,10872
28
- kerykeion-4.10.1.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
29
- kerykeion-4.10.1.dist-info/METADATA,sha256=a4Ha8zpnKE15-4qiAFTVKNDthXgbVUmlcAM93ibhIPs,10826
30
- kerykeion-4.10.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
31
- kerykeion-4.10.1.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
32
- kerykeion-4.10.1.dist-info/RECORD,,
27
+ kerykeion/utilities.py,sha256=2ZDx03qU4KUmlahTrdR5WeGej80OFNQcpV46og4od8E,10908
28
+ kerykeion-4.11.0.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
29
+ kerykeion-4.11.0.dist-info/METADATA,sha256=05feKIoZFNOkVrUpmyltoIKad6Dt06cO2Q3VrzFYh5g,11337
30
+ kerykeion-4.11.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
31
+ kerykeion-4.11.0.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
32
+ kerykeion-4.11.0.dist-info/RECORD,,