kerykeion 4.12.2__tar.gz → 4.12.4__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.12.2 → kerykeion-4.12.4}/PKG-INFO +32 -12
  2. {kerykeion-4.12.2 → kerykeion-4.12.4}/README.md +31 -11
  3. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/astrological_subject.py +33 -7
  4. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/fetch_geonames.py +2 -3
  5. {kerykeion-4.12.2 → kerykeion-4.12.4}/pyproject.toml +1 -1
  6. {kerykeion-4.12.2 → kerykeion-4.12.4}/LICENSE +0 -0
  7. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/__init__.py +0 -0
  8. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/aspects/__init__.py +0 -0
  9. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/aspects/aspects_utils.py +0 -0
  10. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/aspects/natal_aspects.py +0 -0
  11. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/aspects/synastry_aspects.py +0 -0
  12. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/charts/__init__.py +0 -0
  13. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/charts/charts_utils.py +0 -0
  14. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/charts/kerykeion_chart_svg.py +0 -0
  15. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/charts/templates/chart.xml +0 -0
  16. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/enums.py +0 -0
  17. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/kr_types/__init__.py +0 -0
  18. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/kr_types/chart_types.py +0 -0
  19. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/kr_types/kerykeion_exception.py +0 -0
  20. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/kr_types/kr_literals.py +0 -0
  21. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/kr_types/kr_models.py +0 -0
  22. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/kr_types/settings_models.py +0 -0
  23. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/relationship_score.py +0 -0
  24. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/report.py +0 -0
  25. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/settings/__init__.py +0 -0
  26. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/settings/kerykeion_settings.py +0 -0
  27. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/settings/kr.config.json +0 -0
  28. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/sweph/README.md +0 -0
  29. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/sweph/seas_18.se1 +0 -0
  30. {kerykeion-4.12.2 → kerykeion-4.12.4}/kerykeion/utilities.py +0 -0
@@ -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
 
@@ -58,9 +58,11 @@ Kerykeion is a _Python 3.9_ package, make sure you have _Python 3.9_ or above in
58
58
  pip3 install kerykeion
59
59
  ```
60
60
 
61
- ## Usage
61
+ ## Basic Usage
62
62
 
63
- Here some examples:
63
+ 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.
64
+
65
+ Here's an example:
64
66
 
65
67
  ```python
66
68
 
@@ -68,8 +70,8 @@ Here some examples:
68
70
  from kerykeion import AstrologicalSubject
69
71
 
70
72
  # Create a kerykeion instance:
71
- # Args: Name, year, month, day, hour, minuts, city, nation(optional)
72
- kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta")
73
+ # Args: Name, year, month, day, hour, minuts, city, nation
74
+ kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
73
75
 
74
76
  # Get the information about the sun in the chart:
75
77
  # (The position of the planets always starts at 0)
@@ -102,6 +104,23 @@ If you omit the nation, it will be set to "GB" by default, but the value is not
102
104
 
103
105
  ## Generate a SVG Chart
104
106
 
107
+ ### Birth Chart
108
+
109
+ ```python
110
+ from kerykeion import AstrologicalSubject, KerykeionChartSVG
111
+
112
+
113
+ birth_chart = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
114
+ birth_chart_svg = KerykeionChartSVG(birth_chart)
115
+
116
+ birth_chart_svg.makeSVG()
117
+ ```
118
+
119
+ The SVG file will be saved in the home directory.
120
+ ![John Lennon Birth Chart](https://www.kerykeion.net/assets/img/examples/birth-chart.svg)
121
+
122
+ ### Synastry Chart
123
+
105
124
  ```python
106
125
  from kerykeion import AstrologicalSubject, KerykeionChartSVG
107
126
 
@@ -116,7 +135,9 @@ synastry_chart.makeSVG()
116
135
 
117
136
  ![John Lennon and Paul McCartney Synastry](https://www.kerykeion.net/assets/img/examples/synastry-chart.svg)
118
137
 
119
- Note: By default, the generated SVG file will be in the home directory! To change the destination directory:
138
+ ### Change the output directory
139
+
140
+ By default the output directory is the home directory, you can change it by passing the new_output_directory parameter to the KerykeionChartSVG class:
120
141
 
121
142
  ```python
122
143
  from kerykeion import AstrologicalSubject, KerykeionChartSVG
@@ -124,7 +145,7 @@ from kerykeion import AstrologicalSubject, KerykeionChartSVG
124
145
  first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
125
146
  second = AstrologicalSubject("Paul McCartney", 1942, 6, 18, 15, 30, "Liverpool", "GB")
126
147
 
127
- # Synastry Chart
148
+ # Set the output directory to the current directory
128
149
  synastry_chart = KerykeionChartSVG(first, "Synastry", second, new_output_directory=".")
129
150
  synastry_chart.makeSVG()
130
151
  ```
@@ -142,7 +163,7 @@ To print a report of all the data:
142
163
  ```python
143
164
  from kerykeion import Report, AstrologicalSubject
144
165
 
145
- kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta")
166
+ kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
146
167
  report = Report(kanye)
147
168
  report.print_report()
148
169
 
@@ -205,8 +226,8 @@ python3 your_script_name.py > file.txt
205
226
  # Get all aspects between two persons:
206
227
 
207
228
  from kerykeion import SynastryAspects, AstrologicalSubject
208
- first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma")
209
- second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma")
229
+ first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma", "IT")
230
+ second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma", "IT")
210
231
 
211
232
  name = SynastryAspects(first, second)
212
233
  aspect_list = name.get_relevant_aspects()
@@ -271,7 +292,6 @@ subject = AstrologicalSubject.get_from_iso_utc_time(
271
292
 
272
293
  Note : The default time zone is UTC, with Greenwich longitude and latitude.
273
294
 
274
-
275
295
  The default online/offline mode is set to offline, if you set it online the default latitude and longitude will be ignored and
276
296
  calculated from the city and nation. Remember to pass also the geonames_username parameter if you want to use the online mode, like this:
277
297
 
@@ -279,7 +299,7 @@ calculated from the city and nation. Remember to pass also the geonames_username
279
299
  from kerykeion.astrological_subject import AstrologicalSubject
280
300
 
281
301
  # Use the static method get_from_iso_utc_time to create an instance of AstrologicalSubject
282
- subject2 = AstrologicalSubject.get_from_iso_utc_time(
302
+ subject = AstrologicalSubject.get_from_iso_utc_time(
283
303
  "Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US", online=True)
284
304
  ```
285
305
 
@@ -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
  [tool.poetry]
2
2
  name = "kerykeion"
3
- version = "4.12.2"
3
+ version = "4.12.4"
4
4
  authors = ["Giacomo Battaglia <battaglia.giacomo@yahoo.it>"]
5
5
  description = "A python library for astrology."
6
6
  license = "AGPL-3.0"
File without changes