kerykeion 4.12.2__py3-none-any.whl → 4.12.4__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.

@@ -34,8 +34,9 @@ from typing import Union, get_args
34
34
 
35
35
  DEFAULT_GEONAMES_USERNAME = "century.boy"
36
36
  DEFAULT_SIDEREAL_MODE = "FAGAN_BRADLEY"
37
- DEFAULT_HOUSES_SYSTEM = "P"
38
- PERSPECTIVE_TYPE = "Apparent Geocentric"
37
+ DEFAULT_HOUSES_SYSTEM_IDENTIFIER = "P"
38
+ DEFAULT_ZODIAC_TYPE = "Tropic"
39
+ DEFAULT_PERSPECTIVE_TYPE = "Apparent Geocentric"
39
40
  GEONAMES_DEFAULT_USERNAME_WARNING = (
40
41
  "\n********\n"
41
42
  "NO GEONAMES USERNAME SET!\n"
@@ -164,12 +165,12 @@ class AstrologicalSubject:
164
165
  lat: Union[int, float, None] = None,
165
166
  tz_str: Union[str, None] = None,
166
167
  geonames_username: Union[str, None] = None,
167
- zodiac_type: ZodiacType = "Tropic",
168
+ zodiac_type: ZodiacType = DEFAULT_ZODIAC_TYPE,
168
169
  online: bool = True,
169
170
  disable_chiron: bool = False,
170
171
  sidereal_mode: Union[SiderealMode, None] = None,
171
- houses_system_identifier: HousesSystemIdentifier = DEFAULT_HOUSES_SYSTEM,
172
- perspective_type: PerspectiveType = PERSPECTIVE_TYPE
172
+ houses_system_identifier: HousesSystemIdentifier = DEFAULT_HOUSES_SYSTEM_IDENTIFIER,
173
+ perspective_type: PerspectiveType = DEFAULT_PERSPECTIVE_TYPE
173
174
  ) -> None:
174
175
  logging.debug("Starting Kerykeion")
175
176
 
@@ -695,7 +696,13 @@ class AstrologicalSubject:
695
696
  online: bool = False,
696
697
  lng: Union[int, float] = 0,
697
698
  lat: Union[int, float] = 51.5074,
698
- geonames_username: str = DEFAULT_GEONAMES_USERNAME
699
+ geonames_username: str = DEFAULT_GEONAMES_USERNAME,
700
+ zodiac_type: ZodiacType = DEFAULT_ZODIAC_TYPE,
701
+ disable_chiron: bool = False,
702
+ sidereal_mode: Union[SiderealMode, None] = None,
703
+ houses_system_identifier: HousesSystemIdentifier = DEFAULT_HOUSES_SYSTEM_IDENTIFIER,
704
+ perspective_type: PerspectiveType = DEFAULT_PERSPECTIVE_TYPE
705
+
699
706
  ) -> "AstrologicalSubject":
700
707
  """
701
708
  Creates an AstrologicalSubject object from an iso formatted UTC time.
@@ -713,6 +720,18 @@ class AstrologicalSubject:
713
720
  - lat (Union[int, float], optional): Latitude of the birth location. Defaults to 51.5074 (Greenwich, London).
714
721
  - geonames_username (str, optional): The username for the geonames API. Note: Change this to your own username to avoid rate limits!
715
722
  You can get one for free here: https://www.geonames.org/login
723
+ - zodiac_type (ZodiacType, optional): The zodiac type to use. Defaults to "Tropic".
724
+ - disable_chiron (bool, optional): Disables the calculation of Chiron. Defaults to False.
725
+ Chiron calculation can create some issues with the Swiss Ephemeris when the date is too far in the past.
726
+ - sidereal_mode (SiderealMode, optional): Also known as Ayanamsa.
727
+ The mode to use for the sidereal zodiac, according to the Swiss Ephemeris.
728
+ Defaults to None.
729
+ Available modes are visible in the SiderealMode Literal.
730
+ - houses_system_identifier (HousesSystemIdentifier, optional): The system to use for the calculation of the houses.
731
+ Defaults to "P" (Placidus).
732
+ Available systems are visible in the HousesSystemIdentifier Literal.
733
+ - perspective_type (PerspectiveType, optional): The perspective to use for the calculation of the chart.
734
+ Defaults to "Apparent Geocentric".
716
735
 
717
736
  Returns:
718
737
  - AstrologicalSubject: The AstrologicalSubject object.
@@ -728,6 +747,7 @@ class AstrologicalSubject:
728
747
  nation,
729
748
  username=geonames_username,
730
749
  )
750
+
731
751
  city_data: dict[str, str] = geonames.get_serialized_data()
732
752
  lng = float(city_data["lng"])
733
753
  lat = float(city_data["lat"])
@@ -744,7 +764,13 @@ class AstrologicalSubject:
744
764
  lng=lng,
745
765
  lat=lat,
746
766
  tz_str=tz_str,
747
- online=False
767
+ online=False,
768
+ geonames_username=geonames_username,
769
+ zodiac_type=zodiac_type,
770
+ disable_chiron=disable_chiron,
771
+ sidereal_mode=sidereal_mode,
772
+ houses_system_identifier=houses_system_identifier,
773
+ perspective_type=perspective_type
748
774
  )
749
775
 
750
776
  return subject
@@ -79,12 +79,11 @@ class FetchGeonames:
79
79
 
80
80
  params = {
81
81
  "q": city_name,
82
- "contry": country_code,
82
+ "country": country_code,
83
83
  "username": self.username,
84
84
  "maxRows": 1,
85
85
  "style": "SHORT",
86
- "featureClass": "A",
87
- "featureClass": "P",
86
+ "featureClass": ["A", "P"],
88
87
  }
89
88
 
90
89
  prepared_request = Request("GET", self.base_url, params=params).prepare()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kerykeion
3
- Version: 4.12.2
3
+ Version: 4.12.4
4
4
  Summary: A python library for astrology.
5
5
  Home-page: https://www.kerykeion.net/
6
6
  License: AGPL-3.0
@@ -95,9 +95,11 @@ Kerykeion is a _Python 3.9_ package, make sure you have _Python 3.9_ or above in
95
95
  pip3 install kerykeion
96
96
  ```
97
97
 
98
- ## Usage
98
+ ## Basic Usage
99
99
 
100
- Here some examples:
100
+ The basic usage of the library is to create an instance of the AstrologicalSubject class and then access the properties of the instance to get the astrological information about the subject.
101
+
102
+ Here's an example:
101
103
 
102
104
  ```python
103
105
 
@@ -105,8 +107,8 @@ Here some examples:
105
107
  from kerykeion import AstrologicalSubject
106
108
 
107
109
  # Create a kerykeion instance:
108
- # Args: Name, year, month, day, hour, minuts, city, nation(optional)
109
- kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta")
110
+ # Args: Name, year, month, day, hour, minuts, city, nation
111
+ kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
110
112
 
111
113
  # Get the information about the sun in the chart:
112
114
  # (The position of the planets always starts at 0)
@@ -139,6 +141,23 @@ If you omit the nation, it will be set to "GB" by default, but the value is not
139
141
 
140
142
  ## Generate a SVG Chart
141
143
 
144
+ ### Birth Chart
145
+
146
+ ```python
147
+ from kerykeion import AstrologicalSubject, KerykeionChartSVG
148
+
149
+
150
+ birth_chart = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
151
+ birth_chart_svg = KerykeionChartSVG(birth_chart)
152
+
153
+ birth_chart_svg.makeSVG()
154
+ ```
155
+
156
+ The SVG file will be saved in the home directory.
157
+ ![John Lennon Birth Chart](https://www.kerykeion.net/assets/img/examples/birth-chart.svg)
158
+
159
+ ### Synastry Chart
160
+
142
161
  ```python
143
162
  from kerykeion import AstrologicalSubject, KerykeionChartSVG
144
163
 
@@ -153,7 +172,9 @@ synastry_chart.makeSVG()
153
172
 
154
173
  ![John Lennon and Paul McCartney Synastry](https://www.kerykeion.net/assets/img/examples/synastry-chart.svg)
155
174
 
156
- Note: By default, the generated SVG file will be in the home directory! To change the destination directory:
175
+ ### Change the output directory
176
+
177
+ By default the output directory is the home directory, you can change it by passing the new_output_directory parameter to the KerykeionChartSVG class:
157
178
 
158
179
  ```python
159
180
  from kerykeion import AstrologicalSubject, KerykeionChartSVG
@@ -161,7 +182,7 @@ from kerykeion import AstrologicalSubject, KerykeionChartSVG
161
182
  first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
162
183
  second = AstrologicalSubject("Paul McCartney", 1942, 6, 18, 15, 30, "Liverpool", "GB")
163
184
 
164
- # Synastry Chart
185
+ # Set the output directory to the current directory
165
186
  synastry_chart = KerykeionChartSVG(first, "Synastry", second, new_output_directory=".")
166
187
  synastry_chart.makeSVG()
167
188
  ```
@@ -179,7 +200,7 @@ To print a report of all the data:
179
200
  ```python
180
201
  from kerykeion import Report, AstrologicalSubject
181
202
 
182
- kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta")
203
+ kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
183
204
  report = Report(kanye)
184
205
  report.print_report()
185
206
 
@@ -242,8 +263,8 @@ python3 your_script_name.py > file.txt
242
263
  # Get all aspects between two persons:
243
264
 
244
265
  from kerykeion import SynastryAspects, AstrologicalSubject
245
- first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma")
246
- second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma")
266
+ first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma", "IT")
267
+ second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma", "IT")
247
268
 
248
269
  name = SynastryAspects(first, second)
249
270
  aspect_list = name.get_relevant_aspects()
@@ -308,7 +329,6 @@ subject = AstrologicalSubject.get_from_iso_utc_time(
308
329
 
309
330
  Note : The default time zone is UTC, with Greenwich longitude and latitude.
310
331
 
311
-
312
332
  The default online/offline mode is set to offline, if you set it online the default latitude and longitude will be ignored and
313
333
  calculated from the city and nation. Remember to pass also the geonames_username parameter if you want to use the online mode, like this:
314
334
 
@@ -316,7 +336,7 @@ calculated from the city and nation. Remember to pass also the geonames_username
316
336
  from kerykeion.astrological_subject import AstrologicalSubject
317
337
 
318
338
  # Use the static method get_from_iso_utc_time to create an instance of AstrologicalSubject
319
- subject2 = AstrologicalSubject.get_from_iso_utc_time(
339
+ subject = AstrologicalSubject.get_from_iso_utc_time(
320
340
  "Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US", online=True)
321
341
  ```
322
342
 
@@ -4,13 +4,13 @@ kerykeion/aspects/__init__.py,sha256=9FlDVI1ndCJga0-chNIhcLitjU_x3kbtAFfFqVp2ejc
4
4
  kerykeion/aspects/aspects_utils.py,sha256=ZCOnhgW6CZQrCruAGaf8vkUlBtjubbfKOqXy6qyQupE,5321
5
5
  kerykeion/aspects/natal_aspects.py,sha256=R47UToYKqbVrRmGzmY4pgsikcoXNmJvs5KhSmz7HZtM,4460
6
6
  kerykeion/aspects/synastry_aspects.py,sha256=BqG0E4tDZJjPQm3NTX3G6LkTuijP0AsKtI9pwH0F_Mc,3946
7
- kerykeion/astrological_subject.py,sha256=NHeEp9lGG1pXPJfxyCe0gWGweSXqL0QqLe-3jhtfm7s,31126
7
+ kerykeion/astrological_subject.py,sha256=skJW8Xey_cyews-3CRusO_9jDTKTiOFOIWoeX5t0hHA,32781
8
8
  kerykeion/charts/__init__.py,sha256=Juxkduy2TaagWblh_7CE8Acrg3dHL27-WEddJhau_eQ,127
9
9
  kerykeion/charts/charts_utils.py,sha256=Pfy-SkPnABIy5ZkKgypnGqxXOAKhTRIeQX3fQKO8DgQ,15065
10
10
  kerykeion/charts/kerykeion_chart_svg.py,sha256=P3xRWedqdbYjeI1xX9saL729IXBfJ_8TWLz1AzUF5vI,64864
11
11
  kerykeion/charts/templates/chart.xml,sha256=aP_dVC2w2sULBtGrjrOUi46e5m59zKaMizMnTq1VfNM,67714
12
12
  kerykeion/enums.py,sha256=Ben9GLYkPucpYY2ZDpURzUbNCc9jzK2MuaffkgiXFdQ,965
13
- kerykeion/fetch_geonames.py,sha256=ZWB1DbcH54ab3fQhzPhLY0Dz0OaPJqiHFn2e7DRr1MM,4588
13
+ kerykeion/fetch_geonames.py,sha256=NmyTErvKISjJCAxvRB1H35aVZI8_-_U-Cqb_rmqRseA,4563
14
14
  kerykeion/kr_types/__init__.py,sha256=-qhGQikurdoHnGtuT1bsaEeZ-IwmZtIHMjGOPC9_oqQ,295
15
15
  kerykeion/kr_types/chart_types.py,sha256=qaZjm1rMpDDnUZlLjEihd9KPyv3PvrV8vkRmNBuRZzE,2201
16
16
  kerykeion/kr_types/kerykeion_exception.py,sha256=G-7VFta78qBt10l54JZWvwH-3lUNKmDwuILXaVGVu9A,314
@@ -25,8 +25,8 @@ kerykeion/settings/kr.config.json,sha256=1Yhv9RGHom5U9e-JZZRWVfT2Ubllz2WrckdwadD
25
25
  kerykeion/sweph/README.md,sha256=L7FtNAJTWtrZNGKa8MX87SjduFYPYxwWhaI5fmtzNZo,73
26
26
  kerykeion/sweph/seas_18.se1,sha256=X9nCqhZU43wJpq61WAdueVQJt9xL2UjrwPqn1Kdoa1s,223002
27
27
  kerykeion/utilities.py,sha256=1GxV7Du2L9QZEwNKc0oDjNsEddpAFCqY_kyWx38IRiA,11392
28
- kerykeion-4.12.2.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
29
- kerykeion-4.12.2.dist-info/METADATA,sha256=bb53HhXqKyYf_IQW1InjRvBq6kf-pnlQfj0vBblRYxo,13680
30
- kerykeion-4.12.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
31
- kerykeion-4.12.2.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
32
- kerykeion-4.12.2.dist-info/RECORD,,
28
+ kerykeion-4.12.4.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
29
+ kerykeion-4.12.4.dist-info/METADATA,sha256=fNkO9f5i4RViBL-GZIK-P_BEXTHep_wJarbrMkBILP0,14410
30
+ kerykeion-4.12.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
31
+ kerykeion-4.12.4.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
32
+ kerykeion-4.12.4.dist-info/RECORD,,