kerykeion 4.4.2__tar.gz → 4.5.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.
- {kerykeion-4.4.2 → kerykeion-4.5.1}/PKG-INFO +2 -1
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/__init__.py +1 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/astrological_subject.py +36 -7
- kerykeion-4.5.1/kerykeion/enums.py +50 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/kr_types/kr_models.py +1 -1
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/utilities.py +15 -10
- {kerykeion-4.4.2 → kerykeion-4.5.1}/pyproject.toml +1 -1
- {kerykeion-4.4.2 → kerykeion-4.5.1}/LICENSE +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/README.md +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/aspects/__init__.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/aspects/aspects_utils.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/aspects/natal_aspects.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/aspects/synastry_aspects.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/charts/__init__.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/charts/charts_utils.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/charts/kerykeion_chart_svg.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/charts/templates/chart.xml +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/fetch_geonames.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/kr_types/__init__.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/kr_types/chart_types.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/kr_types/kerykeion_exception.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/kr_types/kr_literals.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/kr_types/settings_models.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/relationship_score.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/report.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/settings/__init__.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/settings/kerykeion_settings.py +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/settings/kr.config.json +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/sweph/README.md +0 -0
- {kerykeion-4.4.2 → kerykeion-4.5.1}/kerykeion/sweph/seas_18.se1 +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: kerykeion
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.5.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
|
|
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.9
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
22
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
23
|
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
23
24
|
Classifier: Topic :: Software Development
|
|
@@ -51,6 +51,8 @@ class AstrologicalSubject:
|
|
|
51
51
|
- utc_datetime (datetime, optional): An alternative way of constructing the object,
|
|
52
52
|
if you know the UTC datetime but do not have easy access to e.g. timezone identifier
|
|
53
53
|
_ Defaults to None.
|
|
54
|
+
- disable_chiron (bool, optional): Disables the calculation of Chiron. Defaults to False.
|
|
55
|
+
Chiron calculation can create some issues with the Swiss Ephemeris when the date is too far in the past.
|
|
54
56
|
"""
|
|
55
57
|
|
|
56
58
|
# Defined by the user
|
|
@@ -91,7 +93,7 @@ class AstrologicalSubject:
|
|
|
91
93
|
pluto: KerykeionPointModel
|
|
92
94
|
true_node: KerykeionPointModel
|
|
93
95
|
mean_node: KerykeionPointModel
|
|
94
|
-
chiron: KerykeionPointModel
|
|
96
|
+
chiron: Union[KerykeionPointModel, None]
|
|
95
97
|
|
|
96
98
|
# Houses
|
|
97
99
|
first_house: KerykeionPointModel
|
|
@@ -132,6 +134,7 @@ class AstrologicalSubject:
|
|
|
132
134
|
zodiac_type: ZodiacType = "Tropic",
|
|
133
135
|
online: bool = True,
|
|
134
136
|
utc_datetime: Union[datetime, None] = None,
|
|
137
|
+
disable_chiron: bool = False
|
|
135
138
|
) -> None:
|
|
136
139
|
logging.debug("Starting Kerykeion")
|
|
137
140
|
|
|
@@ -158,6 +161,7 @@ class AstrologicalSubject:
|
|
|
158
161
|
self.json_dir = Path.home()
|
|
159
162
|
self.geonames_username = geonames_username
|
|
160
163
|
self.utc_datetime = utc_datetime
|
|
164
|
+
self.disable_chiron = disable_chiron
|
|
161
165
|
|
|
162
166
|
# This message is set to encourage the user to set a custom geonames username
|
|
163
167
|
if geonames_username is None and online:
|
|
@@ -375,7 +379,11 @@ class AstrologicalSubject:
|
|
|
375
379
|
pluto_deg = swe.calc(self.julian_day, 9, self._iflag)[0][0]
|
|
376
380
|
mean_node_deg = swe.calc(self.julian_day, 10, self._iflag)[0][0]
|
|
377
381
|
true_node_deg = swe.calc(self.julian_day, 11, self._iflag)[0][0]
|
|
378
|
-
|
|
382
|
+
|
|
383
|
+
if not self.disable_chiron:
|
|
384
|
+
chiron_deg = swe.calc(self.julian_day, 15, self._iflag)[0][0]
|
|
385
|
+
else:
|
|
386
|
+
chiron_deg = 0
|
|
379
387
|
|
|
380
388
|
self.planets_degrees_ut = [
|
|
381
389
|
sun_deg,
|
|
@@ -390,8 +398,10 @@ class AstrologicalSubject:
|
|
|
390
398
|
pluto_deg,
|
|
391
399
|
mean_node_deg,
|
|
392
400
|
true_node_deg,
|
|
393
|
-
chiron_deg,
|
|
394
401
|
]
|
|
402
|
+
|
|
403
|
+
if not self.disable_chiron:
|
|
404
|
+
self.planets_degrees_ut.append(chiron_deg)
|
|
395
405
|
|
|
396
406
|
def _planets(self) -> None:
|
|
397
407
|
"""Defines body positon in signs and information and
|
|
@@ -411,7 +421,11 @@ class AstrologicalSubject:
|
|
|
411
421
|
self.pluto = calculate_position(self.planets_degrees_ut[9], "Pluto", point_type=point_type)
|
|
412
422
|
self.mean_node = calculate_position(self.planets_degrees_ut[10], "Mean_Node", point_type=point_type)
|
|
413
423
|
self.true_node = calculate_position(self.planets_degrees_ut[11], "True_Node", point_type=point_type)
|
|
414
|
-
|
|
424
|
+
|
|
425
|
+
if not self.disable_chiron:
|
|
426
|
+
self.chiron = calculate_position(self.planets_degrees_ut[12], "Chiron", point_type=point_type)
|
|
427
|
+
else:
|
|
428
|
+
self.chiron = None
|
|
415
429
|
|
|
416
430
|
def _planets_in_houses(self) -> None:
|
|
417
431
|
"""Calculates the house of the planet and updates
|
|
@@ -472,7 +486,11 @@ class AstrologicalSubject:
|
|
|
472
486
|
self.pluto = for_every_planet(self.pluto, self.planets_degrees_ut[9])
|
|
473
487
|
self.mean_node = for_every_planet(self.mean_node, self.planets_degrees_ut[10])
|
|
474
488
|
self.true_node = for_every_planet(self.true_node, self.planets_degrees_ut[11])
|
|
475
|
-
|
|
489
|
+
|
|
490
|
+
if not self.disable_chiron:
|
|
491
|
+
self.chiron = for_every_planet(self.chiron, self.planets_degrees_ut[12])
|
|
492
|
+
else:
|
|
493
|
+
self.chiron = None
|
|
476
494
|
|
|
477
495
|
self.planets_list = [
|
|
478
496
|
self.sun,
|
|
@@ -487,8 +505,10 @@ class AstrologicalSubject:
|
|
|
487
505
|
self.pluto,
|
|
488
506
|
self.mean_node,
|
|
489
507
|
self.true_node,
|
|
490
|
-
self.chiron
|
|
491
508
|
]
|
|
509
|
+
|
|
510
|
+
if not self.disable_chiron:
|
|
511
|
+
self.planets_list.append(self.chiron)
|
|
492
512
|
|
|
493
513
|
# Check in retrograde or not:
|
|
494
514
|
planets_ret = []
|
|
@@ -643,10 +663,19 @@ class AstrologicalSubject:
|
|
|
643
663
|
if __name__ == "__main__":
|
|
644
664
|
import json
|
|
645
665
|
from kerykeion.utilities import setup_logging
|
|
646
|
-
setup_logging(level="debug")
|
|
647
666
|
|
|
667
|
+
setup_logging(level="debug")
|
|
668
|
+
|
|
669
|
+
# With Chiron enabled
|
|
648
670
|
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US")
|
|
649
671
|
print(json.loads(johnny.json(dump=True)))
|
|
650
672
|
|
|
651
673
|
print('\n')
|
|
652
674
|
print(johnny.chiron)
|
|
675
|
+
|
|
676
|
+
# With Chiron disabled
|
|
677
|
+
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", disable_chiron=True)
|
|
678
|
+
print(json.loads(johnny.json(dump=True)))
|
|
679
|
+
|
|
680
|
+
print('\n')
|
|
681
|
+
print(johnny.chiron)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Planets(Enum):
|
|
5
|
+
SUN = "Sun"
|
|
6
|
+
MOON = "Moon"
|
|
7
|
+
MERCURY = "Mercury"
|
|
8
|
+
VENUS = "Venus"
|
|
9
|
+
MARS = "Mars"
|
|
10
|
+
JUPITER = "Jupiter"
|
|
11
|
+
SATURN = "Saturn"
|
|
12
|
+
URANUS = "Uranus"
|
|
13
|
+
NEPTUNE = "Neptune"
|
|
14
|
+
PLUTO = "Pluto"
|
|
15
|
+
CHIRON = "Chiron"
|
|
16
|
+
TRUE_NODE = "True_Node"
|
|
17
|
+
MEAN_NODE = "Mean_Node"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Aspects(Enum):
|
|
21
|
+
CONJUNCTION = "Conjunction"
|
|
22
|
+
SEXTILE = "Sextile"
|
|
23
|
+
SEMI_SEXTILE = "Semi-Sextile"
|
|
24
|
+
SQUARE = "Square"
|
|
25
|
+
TRINE = "Trine"
|
|
26
|
+
OPPOSITION = "Opposition"
|
|
27
|
+
QUINCUNX = "Quincunx"
|
|
28
|
+
NONE = None
|
|
29
|
+
QUINTILE = "Quintile"
|
|
30
|
+
BIQUINTILE = "Biquintile"
|
|
31
|
+
OCTILE = "Octile"
|
|
32
|
+
TRIOCTILE = "Trioctile"
|
|
33
|
+
DECILE = "Decile"
|
|
34
|
+
TRIDECILE = "Tridecile"
|
|
35
|
+
SESQUIQUADRATE = "Sesquiquadrate"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class Signs(Enum):
|
|
39
|
+
ARI = "Ari"
|
|
40
|
+
TAU = "Tau"
|
|
41
|
+
GEM = "Gem"
|
|
42
|
+
CAN = "Can"
|
|
43
|
+
LEO = "Leo"
|
|
44
|
+
VIR = "Vir"
|
|
45
|
+
LIB = "Lib"
|
|
46
|
+
SCO = "Sco"
|
|
47
|
+
SAG = "Sag"
|
|
48
|
+
CAP = "Cap"
|
|
49
|
+
AQU = "Aqu"
|
|
50
|
+
PIS = "Pis"
|
|
@@ -136,7 +136,7 @@ class AstrologicalSubjectModel(BaseModel):
|
|
|
136
136
|
uranus: KerykeionPointModel
|
|
137
137
|
neptune: KerykeionPointModel
|
|
138
138
|
pluto: KerykeionPointModel
|
|
139
|
-
chiron: KerykeionPointModel
|
|
139
|
+
chiron: Union[KerykeionPointModel, None]
|
|
140
140
|
|
|
141
141
|
# Houses
|
|
142
142
|
first_house: KerykeionPointModel
|
|
@@ -203,15 +203,20 @@ def calculate_position(
|
|
|
203
203
|
|
|
204
204
|
return KerykeionPointModel(**dictionary)
|
|
205
205
|
|
|
206
|
+
|
|
206
207
|
def setup_logging(level: str) -> None:
|
|
207
|
-
"""
|
|
208
|
-
|
|
208
|
+
"""
|
|
209
|
+
Setup logging for testing.
|
|
210
|
+
|
|
209
211
|
Args:
|
|
210
|
-
level: Log level as a string, options: debug, info, warning, error
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
212
|
+
level: Log level as a string, options: debug, info, warning, error
|
|
213
|
+
"""
|
|
214
|
+
logopt: dict[str, int] = {
|
|
215
|
+
"debug": logging.DEBUG,
|
|
216
|
+
"info": logging.INFO,
|
|
217
|
+
"warning": logging.WARNING,
|
|
218
|
+
"error": logging.ERROR,
|
|
219
|
+
}
|
|
220
|
+
format: str = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
221
|
+
loglevel: int = logopt.get(level, logging.INFO)
|
|
222
|
+
logging.basicConfig(format=format, level=loglevel)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|