kerykeion 4.12.1__tar.gz → 4.12.2__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.12.1 → kerykeion-4.12.2}/PKG-INFO +29 -3
- {kerykeion-4.12.1 → kerykeion-4.12.2}/README.md +28 -2
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/astrological_subject.py +77 -19
- {kerykeion-4.12.1 → kerykeion-4.12.2}/pyproject.toml +1 -1
- {kerykeion-4.12.1 → kerykeion-4.12.2}/LICENSE +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/__init__.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/aspects/__init__.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/aspects/aspects_utils.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/aspects/natal_aspects.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/aspects/synastry_aspects.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/charts/__init__.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/charts/charts_utils.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/charts/kerykeion_chart_svg.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/charts/templates/chart.xml +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/enums.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/fetch_geonames.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/kr_types/__init__.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/kr_types/chart_types.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/kr_types/kerykeion_exception.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/kr_types/kr_literals.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/kr_types/kr_models.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/kr_types/settings_models.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/relationship_score.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/report.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/settings/__init__.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/settings/kerykeion_settings.py +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/settings/kr.config.json +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/sweph/README.md +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/sweph/seas_18.se1 +0 -0
- {kerykeion-4.12.1 → kerykeion-4.12.2}/kerykeion/utilities.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: kerykeion
|
|
3
|
-
Version: 4.12.
|
|
3
|
+
Version: 4.12.2
|
|
4
4
|
Summary: A python library for astrology.
|
|
5
5
|
Home-page: https://www.kerykeion.net/
|
|
6
6
|
License: AGPL-3.0
|
|
@@ -236,7 +236,7 @@ And if you want to export it to a file:
|
|
|
236
236
|
python3 your_script_name.py > file.txt
|
|
237
237
|
```
|
|
238
238
|
|
|
239
|
-
## Other
|
|
239
|
+
## Other examples of possible use cases:
|
|
240
240
|
|
|
241
241
|
```python
|
|
242
242
|
# Get all aspects between two persons:
|
|
@@ -257,7 +257,8 @@ print(aspect_list[0])
|
|
|
257
257
|
|
|
258
258
|
## Ayanamsa (Sidereal Modes)
|
|
259
259
|
|
|
260
|
-
|
|
260
|
+
By default, the zodiac type is set to Tropic (Tropical).
|
|
261
|
+
You can set the zodiac type to Sidereal and the sidereal mode in the AstrologicalSubject class:
|
|
261
262
|
|
|
262
263
|
```python
|
|
263
264
|
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
|
|
@@ -269,6 +270,7 @@ Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/ke
|
|
|
269
270
|
|
|
270
271
|
## Houses Systems
|
|
271
272
|
|
|
273
|
+
By default, the houses system is set to Placidus.
|
|
272
274
|
You can set the houses system in the AstrologicalSubject class:
|
|
273
275
|
|
|
274
276
|
```python
|
|
@@ -283,6 +285,7 @@ So far all the available houses system in the Swiss Ephemeris are supported but
|
|
|
283
285
|
|
|
284
286
|
## Perspective Type
|
|
285
287
|
|
|
288
|
+
By default, the perspective type is set to Apparent Geocentric (the most common standard for astrology).
|
|
286
289
|
The perspective indicates the point of view from which the chart is calculated (Es. Apparent Geocentric, Heliocentric, etc.).
|
|
287
290
|
You can set the perspective type in the AstrologicalSubject class:
|
|
288
291
|
|
|
@@ -294,6 +297,29 @@ More examples [here](https://www.kerykeion.net/docs/examples/perspective-type/).
|
|
|
294
297
|
|
|
295
298
|
Full list of supported perspective types [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#PerspectiveType).
|
|
296
299
|
|
|
300
|
+
## Alternative Initialization
|
|
301
|
+
|
|
302
|
+
You can initialize the AstrologicalSubject from a **UTC** ISO 8601 string:
|
|
303
|
+
|
|
304
|
+
```python
|
|
305
|
+
subject = AstrologicalSubject.get_from_iso_utc_time(
|
|
306
|
+
"Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US")
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Note : The default time zone is UTC, with Greenwich longitude and latitude.
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
The default online/offline mode is set to offline, if you set it online the default latitude and longitude will be ignored and
|
|
313
|
+
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
|
+
|
|
315
|
+
```python
|
|
316
|
+
from kerykeion.astrological_subject import AstrologicalSubject
|
|
317
|
+
|
|
318
|
+
# Use the static method get_from_iso_utc_time to create an instance of AstrologicalSubject
|
|
319
|
+
subject2 = AstrologicalSubject.get_from_iso_utc_time(
|
|
320
|
+
"Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US", online=True)
|
|
321
|
+
```
|
|
322
|
+
|
|
297
323
|
## Documentation
|
|
298
324
|
|
|
299
325
|
Most of the functions and the classes are self documented by the types and have docstrings.
|
|
@@ -199,7 +199,7 @@ And if you want to export it to a file:
|
|
|
199
199
|
python3 your_script_name.py > file.txt
|
|
200
200
|
```
|
|
201
201
|
|
|
202
|
-
## Other
|
|
202
|
+
## Other examples of possible use cases:
|
|
203
203
|
|
|
204
204
|
```python
|
|
205
205
|
# Get all aspects between two persons:
|
|
@@ -220,7 +220,8 @@ print(aspect_list[0])
|
|
|
220
220
|
|
|
221
221
|
## Ayanamsa (Sidereal Modes)
|
|
222
222
|
|
|
223
|
-
|
|
223
|
+
By default, the zodiac type is set to Tropic (Tropical).
|
|
224
|
+
You can set the zodiac type to Sidereal and the sidereal mode in the AstrologicalSubject class:
|
|
224
225
|
|
|
225
226
|
```python
|
|
226
227
|
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
|
|
@@ -232,6 +233,7 @@ Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/ke
|
|
|
232
233
|
|
|
233
234
|
## Houses Systems
|
|
234
235
|
|
|
236
|
+
By default, the houses system is set to Placidus.
|
|
235
237
|
You can set the houses system in the AstrologicalSubject class:
|
|
236
238
|
|
|
237
239
|
```python
|
|
@@ -246,6 +248,7 @@ So far all the available houses system in the Swiss Ephemeris are supported but
|
|
|
246
248
|
|
|
247
249
|
## Perspective Type
|
|
248
250
|
|
|
251
|
+
By default, the perspective type is set to Apparent Geocentric (the most common standard for astrology).
|
|
249
252
|
The perspective indicates the point of view from which the chart is calculated (Es. Apparent Geocentric, Heliocentric, etc.).
|
|
250
253
|
You can set the perspective type in the AstrologicalSubject class:
|
|
251
254
|
|
|
@@ -257,6 +260,29 @@ More examples [here](https://www.kerykeion.net/docs/examples/perspective-type/).
|
|
|
257
260
|
|
|
258
261
|
Full list of supported perspective types [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#PerspectiveType).
|
|
259
262
|
|
|
263
|
+
## Alternative Initialization
|
|
264
|
+
|
|
265
|
+
You can initialize the AstrologicalSubject from a **UTC** ISO 8601 string:
|
|
266
|
+
|
|
267
|
+
```python
|
|
268
|
+
subject = AstrologicalSubject.get_from_iso_utc_time(
|
|
269
|
+
"Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US")
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Note : The default time zone is UTC, with Greenwich longitude and latitude.
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
The default online/offline mode is set to offline, if you set it online the default latitude and longitude will be ignored and
|
|
276
|
+
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
|
+
|
|
278
|
+
```python
|
|
279
|
+
from kerykeion.astrological_subject import AstrologicalSubject
|
|
280
|
+
|
|
281
|
+
# Use the static method get_from_iso_utc_time to create an instance of AstrologicalSubject
|
|
282
|
+
subject2 = AstrologicalSubject.get_from_iso_utc_time(
|
|
283
|
+
"Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US", online=True)
|
|
284
|
+
```
|
|
285
|
+
|
|
260
286
|
## Documentation
|
|
261
287
|
|
|
262
288
|
Most of the functions and the classes are self documented by the types and have docstrings.
|
|
@@ -36,6 +36,16 @@ DEFAULT_GEONAMES_USERNAME = "century.boy"
|
|
|
36
36
|
DEFAULT_SIDEREAL_MODE = "FAGAN_BRADLEY"
|
|
37
37
|
DEFAULT_HOUSES_SYSTEM = "P"
|
|
38
38
|
PERSPECTIVE_TYPE = "Apparent Geocentric"
|
|
39
|
+
GEONAMES_DEFAULT_USERNAME_WARNING = (
|
|
40
|
+
"\n********\n"
|
|
41
|
+
"NO GEONAMES USERNAME SET!\n"
|
|
42
|
+
"Using the default geonames username is not recommended, please set a custom one!\n"
|
|
43
|
+
"You can get one for free here:\n"
|
|
44
|
+
"https://www.geonames.org/login\n"
|
|
45
|
+
"Keep in mind that the default username is limited to 2000 requests per hour and is shared with everyone else using this library.\n"
|
|
46
|
+
"********"
|
|
47
|
+
)
|
|
48
|
+
|
|
39
49
|
NOW = datetime.now()
|
|
40
50
|
|
|
41
51
|
|
|
@@ -190,20 +200,7 @@ class AstrologicalSubject:
|
|
|
190
200
|
# This message is set to encourage the user to set a custom geonames username
|
|
191
201
|
if geonames_username is None and online:
|
|
192
202
|
logging.warning(
|
|
193
|
-
|
|
194
|
-
"********" +
|
|
195
|
-
"\n" +
|
|
196
|
-
"NO GEONAMES USERNAME SET!" +
|
|
197
|
-
"\n" +
|
|
198
|
-
"Using the default geonames username is not recommended, please set a custom one!" +
|
|
199
|
-
"\n" +
|
|
200
|
-
"You can get one for free here:" +
|
|
201
|
-
"\n" +
|
|
202
|
-
"https://www.geonames.org/login" +
|
|
203
|
-
"\n" +
|
|
204
|
-
"Keep in mind that the default username is limited to 2000 requests per hour and is shared with everyone else using this library." +
|
|
205
|
-
"\n" +
|
|
206
|
-
"********"
|
|
203
|
+
|
|
207
204
|
)
|
|
208
205
|
|
|
209
206
|
self.geonames_username = DEFAULT_GEONAMES_USERNAME
|
|
@@ -687,6 +684,71 @@ class AstrologicalSubject:
|
|
|
687
684
|
|
|
688
685
|
return float_time
|
|
689
686
|
|
|
687
|
+
|
|
688
|
+
@staticmethod
|
|
689
|
+
def get_from_iso_utc_time(
|
|
690
|
+
name: str,
|
|
691
|
+
iso_utc_time: str,
|
|
692
|
+
city: str = "Greenwich",
|
|
693
|
+
nation: str = "GB",
|
|
694
|
+
tz_str: str = "Etc/GMT",
|
|
695
|
+
online: bool = False,
|
|
696
|
+
lng: Union[int, float] = 0,
|
|
697
|
+
lat: Union[int, float] = 51.5074,
|
|
698
|
+
geonames_username: str = DEFAULT_GEONAMES_USERNAME
|
|
699
|
+
) -> "AstrologicalSubject":
|
|
700
|
+
"""
|
|
701
|
+
Creates an AstrologicalSubject object from an iso formatted UTC time.
|
|
702
|
+
This method is offline by default, set online=True to fetch the timezone and coordinates from geonames.
|
|
703
|
+
|
|
704
|
+
Args:
|
|
705
|
+
- name (str): The name of the subject.
|
|
706
|
+
- iso_utc_time (str): The iso formatted UTC time.
|
|
707
|
+
- city (str, optional): City or location of birth. Defaults to "Greenwich".
|
|
708
|
+
- nation (str, optional): Nation of birth. Defaults to "GB".
|
|
709
|
+
- tz_str (str, optional): Timezone of the birth location. Defaults to "Etc/GMT".
|
|
710
|
+
- online (bool, optional): Sets if you want to use the online mode, which fetches the timezone and coordinates from geonames.
|
|
711
|
+
If you already have the coordinates and timezone, set this to False. Defaults to False.
|
|
712
|
+
- lng (Union[int, float], optional): Longitude of the birth location. Defaults to 0 (Greenwich, London).
|
|
713
|
+
- lat (Union[int, float], optional): Latitude of the birth location. Defaults to 51.5074 (Greenwich, London).
|
|
714
|
+
- geonames_username (str, optional): The username for the geonames API. Note: Change this to your own username to avoid rate limits!
|
|
715
|
+
You can get one for free here: https://www.geonames.org/login
|
|
716
|
+
|
|
717
|
+
Returns:
|
|
718
|
+
- AstrologicalSubject: The AstrologicalSubject object.
|
|
719
|
+
"""
|
|
720
|
+
dt = datetime.fromisoformat(iso_utc_time)
|
|
721
|
+
|
|
722
|
+
if online == True:
|
|
723
|
+
if geonames_username == DEFAULT_GEONAMES_USERNAME:
|
|
724
|
+
logging.warning(GEONAMES_DEFAULT_USERNAME_WARNING)
|
|
725
|
+
|
|
726
|
+
geonames = FetchGeonames(
|
|
727
|
+
city,
|
|
728
|
+
nation,
|
|
729
|
+
username=geonames_username,
|
|
730
|
+
)
|
|
731
|
+
city_data: dict[str, str] = geonames.get_serialized_data()
|
|
732
|
+
lng = float(city_data["lng"])
|
|
733
|
+
lat = float(city_data["lat"])
|
|
734
|
+
|
|
735
|
+
subject = AstrologicalSubject(
|
|
736
|
+
name=name,
|
|
737
|
+
year=dt.year,
|
|
738
|
+
month=dt.month,
|
|
739
|
+
day=dt.day,
|
|
740
|
+
hour=dt.hour,
|
|
741
|
+
minute=dt.minute,
|
|
742
|
+
city=city,
|
|
743
|
+
nation=city,
|
|
744
|
+
lng=lng,
|
|
745
|
+
lat=lat,
|
|
746
|
+
tz_str=tz_str,
|
|
747
|
+
online=False
|
|
748
|
+
)
|
|
749
|
+
|
|
750
|
+
return subject
|
|
751
|
+
|
|
690
752
|
if __name__ == "__main__":
|
|
691
753
|
import json
|
|
692
754
|
from kerykeion.utilities import setup_logging
|
|
@@ -724,8 +786,4 @@ if __name__ == "__main__":
|
|
|
724
786
|
print(johnny.json(dump=True, indent=2))
|
|
725
787
|
|
|
726
788
|
# With Topocentric Perspective
|
|
727
|
-
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", perspective_type="Topocentric")
|
|
728
|
-
|
|
729
|
-
# Print the utc time
|
|
730
|
-
print(johnny.utc_time)
|
|
731
|
-
print(johnny.local_time)
|
|
789
|
+
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", perspective_type="Topocentric")
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|