kerykeion 4.3.1__tar.gz → 4.4.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.3.1 → kerykeion-4.4.1}/PKG-INFO +13 -1
- {kerykeion-4.3.1 → kerykeion-4.4.1}/README.md +12 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/astrological_subject.py +26 -16
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/charts/kerykeion_chart_svg.py +1 -2
- {kerykeion-4.3.1 → kerykeion-4.4.1}/pyproject.toml +1 -1
- {kerykeion-4.3.1 → kerykeion-4.4.1}/LICENSE +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/__init__.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/aspects/__init__.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/aspects/aspects_utils.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/aspects/natal_aspects.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/aspects/synastry_aspects.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/charts/__init__.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/charts/charts_utils.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/charts/templates/chart.xml +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/fetch_geonames.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/kr_types/__init__.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/kr_types/chart_types.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/kr_types/kerykeion_exception.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/kr_types/kr_literals.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/kr_types/kr_models.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/kr_types/settings_models.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/relationship_score.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/report.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/settings/__init__.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/settings/kerykeion_settings.py +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/settings/kr.config.json +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/sweph/README.md +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/sweph/seas_18.se1 +0 -0
- {kerykeion-4.3.1 → kerykeion-4.4.1}/kerykeion/utilities.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: kerykeion
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.4.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
|
|
@@ -63,7 +63,10 @@ also it can calculate the aspects of a single persone or between two, you can se
|
|
|
63
63
|
need in the settings in the utility module.
|
|
64
64
|
It also can generate an SVG of a birthchart, a synastry chart or a transit chart.
|
|
65
65
|
|
|
66
|
+
The core goal of this project is to provide a simple and easy approach to astrology in a data driven way.
|
|
67
|
+
|
|
66
68
|
Here's an example of a birthchart:
|
|
69
|
+
|
|
67
70
|

|
|
68
71
|
|
|
69
72
|
## Web API
|
|
@@ -254,3 +257,12 @@ You can clone this repository or download a zip file using the right side button
|
|
|
254
257
|
|
|
255
258
|
Feel free to contribute to the code!
|
|
256
259
|
|
|
260
|
+
## License
|
|
261
|
+
|
|
262
|
+
This project is licensed under the AGPL-3.0 License.
|
|
263
|
+
To understand how this impacts your use of the software, please see the [LICENSE](LICENSE) file for details.
|
|
264
|
+
If you have questions, you can reach out to me at my [email](mailto:battaglia.giacomo@yahoo.it?subject=Kerykeion) address.
|
|
265
|
+
As a rule of thumb, if you are using this library in a project, you should open source the code of the project with a compatible license.
|
|
266
|
+
|
|
267
|
+
You can implement the logic of kerkeion in your project and also keep it closed source by using a third party API, like the [AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/). The AstrologerAPI is AGPL-3.0 compliant. Subscribing to the API is also, currently, the best way to support the project.
|
|
268
|
+
|
|
@@ -28,7 +28,10 @@ also it can calculate the aspects of a single persone or between two, you can se
|
|
|
28
28
|
need in the settings in the utility module.
|
|
29
29
|
It also can generate an SVG of a birthchart, a synastry chart or a transit chart.
|
|
30
30
|
|
|
31
|
+
The core goal of this project is to provide a simple and easy approach to astrology in a data driven way.
|
|
32
|
+
|
|
31
33
|
Here's an example of a birthchart:
|
|
34
|
+
|
|
32
35
|

|
|
33
36
|
|
|
34
37
|
## Web API
|
|
@@ -218,3 +221,12 @@ You can clone this repository or download a zip file using the right side button
|
|
|
218
221
|
## Contributing
|
|
219
222
|
|
|
220
223
|
Feel free to contribute to the code!
|
|
224
|
+
|
|
225
|
+
## License
|
|
226
|
+
|
|
227
|
+
This project is licensed under the AGPL-3.0 License.
|
|
228
|
+
To understand how this impacts your use of the software, please see the [LICENSE](LICENSE) file for details.
|
|
229
|
+
If you have questions, you can reach out to me at my [email](mailto:battaglia.giacomo@yahoo.it?subject=Kerykeion) address.
|
|
230
|
+
As a rule of thumb, if you are using this library in a project, you should open source the code of the project with a compatible license.
|
|
231
|
+
|
|
232
|
+
You can implement the logic of kerkeion in your project and also keep it closed source by using a third party API, like the [AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/). The AstrologerAPI is AGPL-3.0 compliant. Subscribing to the API is also, currently, the best way to support the project.
|
|
@@ -48,10 +48,14 @@ class AstrologicalSubject:
|
|
|
48
48
|
- geonames_username (str, optional): _ Defaults to 'century.boy'.
|
|
49
49
|
- online (bool, optional): Sets if you want to use the online mode (using
|
|
50
50
|
geonames) or not. Defaults to True.
|
|
51
|
+
- utc_datetime (datetime, optional): An alternative way of constructing the object,
|
|
52
|
+
if you know the UTC datetime but do not have easy access to e.g. timezone identifier
|
|
53
|
+
_ Defaults to None.
|
|
51
54
|
"""
|
|
52
55
|
|
|
53
56
|
# Defined by the user
|
|
54
57
|
name: str
|
|
58
|
+
utc_datetime: Union[datetime, None]
|
|
55
59
|
year: int
|
|
56
60
|
month: int
|
|
57
61
|
day: int
|
|
@@ -111,7 +115,6 @@ class AstrologicalSubject:
|
|
|
111
115
|
|
|
112
116
|
now = datetime.now()
|
|
113
117
|
|
|
114
|
-
|
|
115
118
|
def __init__(
|
|
116
119
|
self,
|
|
117
120
|
name="Now",
|
|
@@ -128,6 +131,7 @@ class AstrologicalSubject:
|
|
|
128
131
|
geonames_username: Union[str, None] = None,
|
|
129
132
|
zodiac_type: ZodiacType = "Tropic",
|
|
130
133
|
online: bool = True,
|
|
134
|
+
utc_datetime: Union[datetime, None] = None,
|
|
131
135
|
) -> None:
|
|
132
136
|
logging.debug("Starting Kerykeion")
|
|
133
137
|
|
|
@@ -153,23 +157,24 @@ class AstrologicalSubject:
|
|
|
153
157
|
self.online = online
|
|
154
158
|
self.json_dir = Path.home()
|
|
155
159
|
self.geonames_username = geonames_username
|
|
160
|
+
self.utc_datetime = utc_datetime
|
|
156
161
|
|
|
157
162
|
# This message is set to encourage the user to set a custom geonames username
|
|
158
163
|
if geonames_username is None and online:
|
|
159
164
|
logging.info(
|
|
160
165
|
"\n"
|
|
161
|
-
"********" +
|
|
162
|
-
"\n" +
|
|
163
|
-
"NO GEONAMES USERNAME SET!" +
|
|
164
|
-
"\n" +
|
|
165
|
-
"Using the default geonames username is not recommended, please set a custom one!" +
|
|
166
|
-
"\n" +
|
|
167
|
-
"You can get one for free here:" +
|
|
168
|
-
"\n" +
|
|
169
|
-
"https://www.geonames.org/login" +
|
|
170
|
-
"\n" +
|
|
171
|
-
"Keep in mind that the default username is limited to 2000 requests per hour and is shared with everyone else using this library." +
|
|
172
|
-
"\n" +
|
|
166
|
+
"********" +
|
|
167
|
+
"\n" +
|
|
168
|
+
"NO GEONAMES USERNAME SET!" +
|
|
169
|
+
"\n" +
|
|
170
|
+
"Using the default geonames username is not recommended, please set a custom one!" +
|
|
171
|
+
"\n" +
|
|
172
|
+
"You can get one for free here:" +
|
|
173
|
+
"\n" +
|
|
174
|
+
"https://www.geonames.org/login" +
|
|
175
|
+
"\n" +
|
|
176
|
+
"Keep in mind that the default username is limited to 2000 requests per hour and is shared with everyone else using this library." +
|
|
177
|
+
"\n" +
|
|
173
178
|
"********"
|
|
174
179
|
)
|
|
175
180
|
|
|
@@ -205,10 +210,10 @@ class AstrologicalSubject:
|
|
|
205
210
|
|
|
206
211
|
def __repr__(self) -> str:
|
|
207
212
|
return f"Astrological data for: {self.name}, {self.utc} UTC\nBirth location: {self.city}, Lat {self.lat}, Lon {self.lng}"
|
|
208
|
-
|
|
213
|
+
|
|
209
214
|
def __getitem__(self, item):
|
|
210
215
|
return getattr(self, item)
|
|
211
|
-
|
|
216
|
+
|
|
212
217
|
def get(self, item, default=None):
|
|
213
218
|
return getattr(self, item, default)
|
|
214
219
|
|
|
@@ -245,6 +250,11 @@ class AstrologicalSubject:
|
|
|
245
250
|
if (self.online) and (not self.tz_str or not self.lng or not self.lat):
|
|
246
251
|
self._fetch_tz_from_geonames()
|
|
247
252
|
|
|
253
|
+
# If UTC datetime is provided, then use it directly
|
|
254
|
+
if (self.utc_datetime):
|
|
255
|
+
self.utc = self.utc_datetime
|
|
256
|
+
return
|
|
257
|
+
|
|
248
258
|
local_time = pytz.timezone(self.tz_str)
|
|
249
259
|
|
|
250
260
|
naive_datetime = datetime(self.year, self.month, self.day, self.hour, self.minute, 0)
|
|
@@ -584,7 +594,7 @@ class AstrologicalSubject:
|
|
|
584
594
|
if self.lat > 66.0:
|
|
585
595
|
self.lat = 66.0
|
|
586
596
|
logging.info("Polar circle override for houses, using 66 degrees")
|
|
587
|
-
|
|
597
|
+
|
|
588
598
|
elif self.lat < -66.0:
|
|
589
599
|
self.lat = -66.0
|
|
590
600
|
logging.info("Polar circle override for houses, using -66 degrees")
|
|
@@ -1461,8 +1461,7 @@ class KerykeionChartSVG:
|
|
|
1461
1461
|
td = self._createTemplateDictionary()
|
|
1462
1462
|
|
|
1463
1463
|
# read template
|
|
1464
|
-
with open(self.xml_svg, "r", encoding="utf-8", errors="ignore") as
|
|
1465
|
-
f = open(self.xml_svg)
|
|
1464
|
+
with open(self.xml_svg, "r", encoding="utf-8", errors="ignore") as f:
|
|
1466
1465
|
template = Template(f.read()).substitute(td)
|
|
1467
1466
|
|
|
1468
1467
|
# return filename
|
|
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
|