kerykeion 5.0.0a12__py3-none-any.whl → 5.0.0b1__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.
- kerykeion/__init__.py +30 -6
- kerykeion/aspects/aspects_factory.py +40 -24
- kerykeion/aspects/aspects_utils.py +75 -6
- kerykeion/astrological_subject_factory.py +377 -226
- kerykeion/backword.py +680 -0
- kerykeion/chart_data_factory.py +484 -0
- kerykeion/charts/{kerykeion_chart_svg.py → chart_drawer.py} +612 -438
- kerykeion/charts/charts_utils.py +135 -94
- kerykeion/charts/draw_planets.py +38 -28
- kerykeion/charts/templates/aspect_grid_only.xml +188 -17
- kerykeion/charts/templates/chart.xml +104 -28
- kerykeion/charts/templates/wheel_only.xml +195 -24
- kerykeion/charts/themes/classic.css +11 -0
- kerykeion/charts/themes/dark-high-contrast.css +11 -0
- kerykeion/charts/themes/dark.css +11 -0
- kerykeion/charts/themes/light.css +11 -0
- kerykeion/charts/themes/strawberry.css +10 -0
- kerykeion/composite_subject_factory.py +4 -4
- kerykeion/ephemeris_data_factory.py +12 -9
- kerykeion/house_comparison/__init__.py +0 -3
- kerykeion/house_comparison/house_comparison_factory.py +3 -3
- kerykeion/house_comparison/house_comparison_utils.py +3 -4
- kerykeion/planetary_return_factory.py +8 -4
- kerykeion/relationship_score_factory.py +3 -3
- kerykeion/report.py +748 -67
- kerykeion/{kr_types → schemas}/__init__.py +44 -4
- kerykeion/schemas/chart_template_model.py +340 -0
- kerykeion/{kr_types → schemas}/kr_literals.py +7 -3
- kerykeion/{kr_types → schemas}/kr_models.py +220 -11
- kerykeion/{kr_types → schemas}/settings_models.py +7 -7
- kerykeion/settings/config_constants.py +75 -8
- kerykeion/settings/kerykeion_settings.py +1 -1
- kerykeion/settings/kr.config.json +130 -40
- kerykeion/settings/legacy/legacy_celestial_points_settings.py +8 -8
- kerykeion/sweph/ast136/s136108s.se1 +0 -0
- kerykeion/sweph/ast136/s136199s.se1 +0 -0
- kerykeion/sweph/ast136/s136472s.se1 +0 -0
- kerykeion/sweph/ast28/se28978s.se1 +0 -0
- kerykeion/sweph/ast50/se50000s.se1 +0 -0
- kerykeion/sweph/ast90/se90377s.se1 +0 -0
- kerykeion/sweph/ast90/se90482s.se1 +0 -0
- kerykeion/transits_time_range_factory.py +7 -7
- kerykeion/utilities.py +61 -38
- {kerykeion-5.0.0a12.dist-info → kerykeion-5.0.0b1.dist-info}/METADATA +507 -120
- kerykeion-5.0.0b1.dist-info/RECORD +58 -0
- kerykeion/house_comparison/house_comparison_models.py +0 -76
- kerykeion/kr_types/chart_types.py +0 -106
- kerykeion-5.0.0a12.dist-info/RECORD +0 -50
- /kerykeion/{kr_types → schemas}/kerykeion_exception.py +0 -0
- {kerykeion-5.0.0a12.dist-info → kerykeion-5.0.0b1.dist-info}/WHEEL +0 -0
- {kerykeion-5.0.0a12.dist-info → kerykeion-5.0.0b1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kerykeion
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.0b1
|
|
4
4
|
Summary: A Python library for astrological calculations, including natal charts, houses, planetary aspects, and SVG chart generation.
|
|
5
5
|
Project-URL: Homepage, https://www.kerykeion.net/
|
|
6
6
|
Project-URL: Repository, https://github.com/g-battaglia/kerykeion
|
|
@@ -108,7 +108,9 @@ If you're looking for the latest stable version, please check out the [`master`]
|
|
|
108
108
|
- [Minified SVG](#minified-svg)
|
|
109
109
|
- [SVG without CSS Variables](#svg-without-css-variables)
|
|
110
110
|
- [Grid Only SVG](#grid-only-svg)
|
|
111
|
-
- [Report](#report)
|
|
111
|
+
- [Report Generator](#report-generator)
|
|
112
|
+
- [Quick Examples](#quick-examples)
|
|
113
|
+
- [Section Access](#section-access)
|
|
112
114
|
- [Example: Retrieving Aspects](#example-retrieving-aspects)
|
|
113
115
|
- [Ayanamsa (Sidereal Modes)](#ayanamsa-sidereal-modes)
|
|
114
116
|
- [House Systems](#house-systems)
|
|
@@ -119,6 +121,24 @@ If you're looking for the latest stable version, please check out the [`master`]
|
|
|
119
121
|
- [JSON Support](#json-support)
|
|
120
122
|
- [Auto Generated Documentation](#auto-generated-documentation)
|
|
121
123
|
- [Development](#development)
|
|
124
|
+
- [Kerykeion v5.0 – What's New](#kerykeion-v50--whats-new)
|
|
125
|
+
- [🎯 Key Highlights](#-key-highlights)
|
|
126
|
+
- [Factory-Centered Architecture](#factory-centered-architecture)
|
|
127
|
+
- [Pydantic 2 Models \& Type Safety](#pydantic-2-models--type-safety)
|
|
128
|
+
- [Enhanced Features](#enhanced-features)
|
|
129
|
+
- [🚨 Breaking Changes](#-breaking-changes)
|
|
130
|
+
- [1. Removed Legacy Classes](#1-removed-legacy-classes)
|
|
131
|
+
- [2. Import Changes](#2-import-changes)
|
|
132
|
+
- [3. Lunar Nodes Naming](#3-lunar-nodes-naming)
|
|
133
|
+
- [4. Chart Generation Changes](#4-chart-generation-changes)
|
|
134
|
+
- [5. Aspects API Changes](#5-aspects-api-changes)
|
|
135
|
+
- [🔄 Migration Guide](#-migration-guide)
|
|
136
|
+
- [Using the Backward Compatibility Layer](#using-the-backward-compatibility-layer)
|
|
137
|
+
- [Step-by-Step Migration](#step-by-step-migration)
|
|
138
|
+
- [Automated Migration Script](#automated-migration-script)
|
|
139
|
+
- [📦 Other Notable Changes](#-other-notable-changes)
|
|
140
|
+
- [🎨 New Themes](#-new-themes)
|
|
141
|
+
- [📚 Resources](#-resources)
|
|
122
142
|
- [Integrating Kerykeion into Your Project](#integrating-kerykeion-into-your-project)
|
|
123
143
|
- [License](#license)
|
|
124
144
|
- [Contributing](#contributing)
|
|
@@ -170,7 +190,7 @@ john = AstrologicalSubjectFactory.from_birth_data(
|
|
|
170
190
|
|
|
171
191
|
## Generate a SVG Chart
|
|
172
192
|
|
|
173
|
-
To generate a chart, use the `
|
|
193
|
+
To generate a chart, use the `ChartDataFactory` to pre-compute chart data, then `ChartDrawer` to create the visualization. This two-step process ensures clean separation between astrological calculations and chart rendering.
|
|
174
194
|
|
|
175
195
|
**Tip:**
|
|
176
196
|
The optimized way to open the generated SVG files is with a web browser (e.g., Chrome, Firefox).
|
|
@@ -179,11 +199,19 @@ To improve compatibility across different applications, you can use the `remove_
|
|
|
179
199
|
### Birth Chart
|
|
180
200
|
|
|
181
201
|
```python
|
|
182
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
202
|
+
from kerykeion import AstrologicalSubjectFactory
|
|
203
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
204
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
183
205
|
|
|
206
|
+
# Step 1: Create subject
|
|
184
207
|
john = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
185
|
-
|
|
186
|
-
|
|
208
|
+
|
|
209
|
+
# Step 2: Pre-compute chart data
|
|
210
|
+
chart_data = ChartDataFactory.create_natal_chart_data(john)
|
|
211
|
+
|
|
212
|
+
# Step 3: Create visualization
|
|
213
|
+
birth_chart_svg = ChartDrawer(chart_data=chart_data)
|
|
214
|
+
birth_chart_svg.save_svg()
|
|
187
215
|
```
|
|
188
216
|
|
|
189
217
|
The SVG file will be saved in the home directory.
|
|
@@ -192,23 +220,39 @@ The SVG file will be saved in the home directory.
|
|
|
192
220
|
### External Birth Chart
|
|
193
221
|
|
|
194
222
|
```python
|
|
195
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
223
|
+
from kerykeion import AstrologicalSubjectFactory
|
|
224
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
225
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
226
|
+
|
|
227
|
+
# Step 1: Create subject
|
|
196
228
|
birth_chart = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
197
|
-
|
|
198
|
-
|
|
229
|
+
|
|
230
|
+
# Step 2: Pre-compute chart data for external natal chart
|
|
231
|
+
chart_data = ChartDataFactory.create_external_natal_chart_data(birth_chart)
|
|
232
|
+
|
|
233
|
+
# Step 3: Create visualization
|
|
234
|
+
birth_chart_svg = ChartDrawer(chart_data=chart_data)
|
|
235
|
+
birth_chart_svg.save_svg()
|
|
199
236
|
```
|
|
200
237
|

|
|
201
238
|
|
|
202
239
|
### Synastry Chart
|
|
203
240
|
|
|
204
241
|
```python
|
|
205
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
242
|
+
from kerykeion import AstrologicalSubjectFactory
|
|
243
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
244
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
206
245
|
|
|
246
|
+
# Step 1: Create subjects
|
|
207
247
|
first = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
208
248
|
second = AstrologicalSubjectFactory.from_birth_data("Paul McCartney", 1942, 6, 18, 15, 30, "Liverpool", "GB")
|
|
209
249
|
|
|
210
|
-
|
|
211
|
-
|
|
250
|
+
# Step 2: Pre-compute synastry chart data
|
|
251
|
+
chart_data = ChartDataFactory.create_synastry_chart_data(first, second)
|
|
252
|
+
|
|
253
|
+
# Step 3: Create visualization
|
|
254
|
+
synastry_chart = ChartDrawer(chart_data=chart_data)
|
|
255
|
+
synastry_chart.save_svg()
|
|
212
256
|
```
|
|
213
257
|
|
|
214
258
|

|
|
@@ -217,13 +261,20 @@ synastry_chart.makeSVG()
|
|
|
217
261
|
### Transit Chart
|
|
218
262
|
|
|
219
263
|
```python
|
|
220
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
264
|
+
from kerykeion import AstrologicalSubjectFactory
|
|
265
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
266
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
221
267
|
|
|
268
|
+
# Step 1: Create subjects
|
|
222
269
|
transit = AstrologicalSubjectFactory.from_birth_data("Transit", 2025, 6, 8, 8, 45, "Atlanta", "US")
|
|
223
270
|
subject = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
224
271
|
|
|
225
|
-
|
|
226
|
-
|
|
272
|
+
# Step 2: Pre-compute transit chart data
|
|
273
|
+
chart_data = ChartDataFactory.create_transit_chart_data(subject, transit)
|
|
274
|
+
|
|
275
|
+
# Step 3: Create visualization
|
|
276
|
+
transit_chart = ChartDrawer(chart_data=chart_data)
|
|
277
|
+
transit_chart.save_svg()
|
|
227
278
|
```
|
|
228
279
|
|
|
229
280
|

|
|
@@ -231,17 +282,25 @@ transit_chart.makeSVG()
|
|
|
231
282
|
### Composite Chart
|
|
232
283
|
|
|
233
284
|
```python
|
|
234
|
-
from kerykeion import CompositeSubjectFactory, AstrologicalSubjectFactory
|
|
285
|
+
from kerykeion import CompositeSubjectFactory, AstrologicalSubjectFactory
|
|
286
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
287
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
235
288
|
|
|
289
|
+
# Step 1: Create subjects
|
|
236
290
|
angelina = AstrologicalSubjectFactory.from_birth_data("Angelina Jolie", 1975, 6, 4, 9, 9, "Los Angeles", "US", lng=-118.15, lat=34.03, tz_str="America/Los_Angeles")
|
|
237
291
|
|
|
238
292
|
brad = AstrologicalSubjectFactory.from_birth_data("Brad Pitt", 1963, 12, 18, 6, 31, "Shawnee", "US", lng=-96.56, lat=35.20, tz_str="America/Chicago")
|
|
239
293
|
|
|
294
|
+
# Step 2: Create composite subject
|
|
240
295
|
factory = CompositeSubjectFactory(angelina, brad)
|
|
241
296
|
composite_model = factory.get_midpoint_composite_subject_model()
|
|
242
297
|
|
|
243
|
-
|
|
244
|
-
|
|
298
|
+
# Step 3: Pre-compute composite chart data
|
|
299
|
+
chart_data = ChartDataFactory.create_composite_chart_data(composite_model)
|
|
300
|
+
|
|
301
|
+
# Step 4: Create visualization
|
|
302
|
+
composite_chart = ChartDrawer(chart_data=chart_data)
|
|
303
|
+
composite_chart.save_svg()
|
|
245
304
|
```
|
|
246
305
|
|
|
247
306
|

|
|
@@ -252,21 +311,38 @@ For *all* the charts, you can generate a wheel-only chart by using the method `m
|
|
|
252
311
|
|
|
253
312
|
### Birth Chart
|
|
254
313
|
```python
|
|
255
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
314
|
+
from kerykeion import AstrologicalSubjectFactory
|
|
315
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
316
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
256
317
|
|
|
318
|
+
# Step 1: Create subject
|
|
257
319
|
birth_chart = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
258
|
-
|
|
259
|
-
|
|
320
|
+
|
|
321
|
+
# Step 2: Pre-compute chart data
|
|
322
|
+
chart_data = ChartDataFactory.create_natal_chart_data(birth_chart)
|
|
323
|
+
|
|
324
|
+
# Step 3: Create visualization
|
|
325
|
+
birth_chart_svg = ChartDrawer(chart_data=chart_data)
|
|
326
|
+
birth_chart_svg.save_wheel_only_svg_file()
|
|
260
327
|
```
|
|
261
328
|

|
|
262
329
|
|
|
263
330
|
### Wheel Only Birth Chart (External)
|
|
264
331
|
|
|
265
332
|
```python
|
|
266
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
333
|
+
from kerykeion import AstrologicalSubjectFactory
|
|
334
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
335
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
336
|
+
|
|
337
|
+
# Step 1: Create subject
|
|
267
338
|
birth_chart = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
268
|
-
|
|
269
|
-
|
|
339
|
+
|
|
340
|
+
# Step 2: Pre-compute external natal chart data
|
|
341
|
+
chart_data = ChartDataFactory.create_external_natal_chart_data(birth_chart)
|
|
342
|
+
|
|
343
|
+
# Step 3: Create visualization
|
|
344
|
+
birth_chart_svg = ChartDrawer(chart_data=chart_data)
|
|
345
|
+
birth_chart_svg.save_wheel_only_svg_file(
|
|
270
346
|
wheel_only=True,
|
|
271
347
|
wheel_only_external=True
|
|
272
348
|
)
|
|
@@ -276,47 +352,66 @@ birth_chart_svg.makeWheelOnlySVG(
|
|
|
276
352
|
|
|
277
353
|
### Synastry Chart
|
|
278
354
|
```python
|
|
279
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
355
|
+
from kerykeion import AstrologicalSubjectFactory
|
|
356
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
357
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
358
|
+
|
|
359
|
+
# Step 1: Create subjects
|
|
280
360
|
first = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
281
361
|
second = AstrologicalSubjectFactory.from_birth_data("Paul McCartney", 1942, 6, 18, 15, 30, "Liverpool", "GB")
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
)
|
|
285
|
-
|
|
362
|
+
|
|
363
|
+
# Step 2: Pre-compute synastry chart data
|
|
364
|
+
chart_data = ChartDataFactory.create_synastry_chart_data(first, second)
|
|
365
|
+
|
|
366
|
+
# Step 3: Create visualization
|
|
367
|
+
synastry_chart = ChartDrawer(chart_data=chart_data)
|
|
368
|
+
synastry_chart.save_wheel_only_svg_file()
|
|
286
369
|
```
|
|
287
370
|
|
|
288
371
|

|
|
289
372
|
|
|
290
373
|
### Change the Output Directory
|
|
291
374
|
|
|
292
|
-
To save the SVG file in a custom location, specify `
|
|
375
|
+
To save the SVG file in a custom location, specify the `output_path` parameter in `save_svg()`:
|
|
293
376
|
|
|
294
377
|
```python
|
|
295
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
378
|
+
from kerykeion import AstrologicalSubjectFactory
|
|
379
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
380
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
296
381
|
|
|
382
|
+
# Step 1: Create subjects
|
|
297
383
|
first = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
298
384
|
second = AstrologicalSubjectFactory.from_birth_data("Paul McCartney", 1942, 6, 18, 15, 30, "Liverpool", "GB")
|
|
299
385
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
synastry_chart
|
|
386
|
+
# Step 2: Pre-compute synastry chart data
|
|
387
|
+
chart_data = ChartDataFactory.create_synastry_chart_data(first, second)
|
|
388
|
+
|
|
389
|
+
# Step 3: Create visualization with custom output directory
|
|
390
|
+
synastry_chart = ChartDrawer(chart_data=chart_data)
|
|
391
|
+
synastry_chart.save_svg(output_path=".")
|
|
305
392
|
```
|
|
306
393
|
|
|
307
394
|
### Change Language
|
|
308
395
|
|
|
309
|
-
You can switch chart language by passing `chart_language` to the `
|
|
396
|
+
You can switch chart language by passing `chart_language` to the `ChartDrawer` class:
|
|
310
397
|
|
|
311
398
|
```python
|
|
312
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
399
|
+
from kerykeion import AstrologicalSubjectFactory
|
|
400
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
401
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
313
402
|
|
|
403
|
+
# Step 1: Create subject
|
|
314
404
|
birth_chart = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
315
|
-
|
|
316
|
-
|
|
405
|
+
|
|
406
|
+
# Step 2: Pre-compute chart data
|
|
407
|
+
chart_data = ChartDataFactory.create_natal_chart_data(birth_chart)
|
|
408
|
+
|
|
409
|
+
# Step 3: Create visualization with Italian language
|
|
410
|
+
birth_chart_svg = ChartDrawer(
|
|
411
|
+
chart_data=chart_data,
|
|
317
412
|
chart_language="IT" # Change to Italian
|
|
318
413
|
)
|
|
319
|
-
birth_chart_svg.
|
|
414
|
+
birth_chart_svg.save_svg()
|
|
320
415
|
```
|
|
321
416
|
|
|
322
417
|
More details [here](https://www.kerykeion.net/docs/chart-language).
|
|
@@ -337,10 +432,19 @@ The available languages are:
|
|
|
337
432
|
To generate a minified SVG, set `minify_svg=True` in the `makeSVG()` method:
|
|
338
433
|
|
|
339
434
|
```python
|
|
340
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
435
|
+
from kerykeion import AstrologicalSubjectFactory
|
|
436
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
437
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
438
|
+
|
|
439
|
+
# Step 1: Create subject
|
|
341
440
|
birth_chart = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
342
|
-
|
|
343
|
-
|
|
441
|
+
|
|
442
|
+
# Step 2: Pre-compute chart data
|
|
443
|
+
chart_data = ChartDataFactory.create_natal_chart_data(birth_chart)
|
|
444
|
+
|
|
445
|
+
# Step 3: Create visualization
|
|
446
|
+
birth_chart_svg = ChartDrawer(chart_data=chart_data)
|
|
447
|
+
birth_chart_svg.save_svg(
|
|
344
448
|
minify=True
|
|
345
449
|
)
|
|
346
450
|
```
|
|
@@ -349,11 +453,19 @@ birth_chart_svg.makeSVG(
|
|
|
349
453
|
To generate an SVG without CSS variables, set `remove_css_variables=True` in the `makeSVG()` method:
|
|
350
454
|
|
|
351
455
|
```python
|
|
352
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
456
|
+
from kerykeion import AstrologicalSubjectFactory
|
|
457
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
458
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
353
459
|
|
|
460
|
+
# Step 1: Create subject
|
|
354
461
|
birth_chart = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
355
|
-
|
|
356
|
-
|
|
462
|
+
|
|
463
|
+
# Step 2: Pre-compute chart data
|
|
464
|
+
chart_data = ChartDataFactory.create_natal_chart_data(birth_chart)
|
|
465
|
+
|
|
466
|
+
# Step 3: Create visualization
|
|
467
|
+
birth_chart_svg = ChartDrawer(chart_data=chart_data)
|
|
468
|
+
birth_chart_svg.save_svg(
|
|
357
469
|
remove_css_variables=True
|
|
358
470
|
)
|
|
359
471
|
```
|
|
@@ -362,83 +474,77 @@ This will inline all styles and eliminate CSS variables, resulting in an SVG tha
|
|
|
362
474
|
|
|
363
475
|
### Grid Only SVG
|
|
364
476
|
|
|
365
|
-
It's possible to generate a grid-only SVG, useful for creating a custom layout. To do this, use the `
|
|
477
|
+
It's possible to generate a grid-only SVG, useful for creating a custom layout. To do this, use the `save_aspect_grid_only_svg_file()` method:
|
|
366
478
|
|
|
367
479
|
```python
|
|
368
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
480
|
+
from kerykeion import AstrologicalSubjectFactory
|
|
481
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
482
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
483
|
+
|
|
484
|
+
# Step 1: Create subjects
|
|
369
485
|
birth_chart = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
370
486
|
second = AstrologicalSubjectFactory.from_birth_data("Paul McCartney", 1942, 6, 18, 15, 30, "Liverpool", "GB")
|
|
371
|
-
|
|
372
|
-
|
|
487
|
+
|
|
488
|
+
# Step 2: Pre-compute synastry chart data
|
|
489
|
+
chart_data = ChartDataFactory.create_synastry_chart_data(birth_chart, second)
|
|
490
|
+
|
|
491
|
+
# Step 3: Create visualization with dark theme
|
|
492
|
+
aspect_grid_chart = ChartDrawer(chart_data=chart_data, theme="dark")
|
|
493
|
+
aspect_grid_chart.save_aspect_grid_only_svg_file()
|
|
373
494
|
```
|
|
374
495
|

|
|
375
496
|
|
|
376
|
-
## Report
|
|
497
|
+
## Report Generator
|
|
498
|
+
|
|
499
|
+
`ReportGenerator` mirrors the chart-type dispatch of `ChartDrawer`. It accepts raw `AstrologicalSubjectModel` instances as well as any `ChartDataModel` produced by `ChartDataFactory`—including natal, composite, synastry, transit, and planetary return charts—and renders the appropriate textual report automatically.
|
|
500
|
+
|
|
501
|
+
### Quick Examples
|
|
377
502
|
|
|
378
503
|
```python
|
|
379
|
-
from kerykeion import
|
|
504
|
+
from kerykeion import ReportGenerator, AstrologicalSubjectFactory, ChartDataFactory
|
|
380
505
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
lat=53.4000, # Latitude for Liverpool
|
|
385
|
-
tz_str="Europe/London", # Timezone for Liverpool
|
|
386
|
-
city="Liverpool",
|
|
506
|
+
# Subject-only report
|
|
507
|
+
subject = AstrologicalSubjectFactory.from_birth_data(
|
|
508
|
+
"Sample Natal", 1990, 7, 21, 14, 45, "Rome", "IT"
|
|
387
509
|
)
|
|
388
|
-
|
|
389
|
-
report.print_report()
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
Report output:
|
|
393
|
-
```plaintext
|
|
394
|
-
+- Kerykeion report for John Lennon -+
|
|
395
|
-
+-----------+-------+---------------+-----------+----------+
|
|
396
|
-
| Date | Time | Location | Longitude | Latitude |
|
|
397
|
-
+-----------+-------+---------------+-----------+----------+
|
|
398
|
-
| 9/10/1940 | 18:30 | Liverpool, GB | -2.9833 | 53.4 |
|
|
399
|
-
+-----------+-------+---------------+-----------+----------+
|
|
400
|
-
+-------------------+------+-------+------+----------------+
|
|
401
|
-
| AstrologicalPoint | Sign | Pos. | Ret. | House |
|
|
402
|
-
+-------------------+------+-------+------+----------------+
|
|
403
|
-
| Sun | Lib | 16.27 | - | Sixth_House |
|
|
404
|
-
| Moon | Aqu | 3.55 | - | Eleventh_House |
|
|
405
|
-
| Mercury | Sco | 8.56 | - | Seventh_House |
|
|
406
|
-
| Venus | Vir | 3.22 | - | Sixth_House |
|
|
407
|
-
| Mars | Lib | 2.66 | - | Sixth_House |
|
|
408
|
-
| Jupiter | Tau | 13.69 | R | First_House |
|
|
409
|
-
| Saturn | Tau | 13.22 | R | First_House |
|
|
410
|
-
| Uranus | Tau | 25.55 | R | First_House |
|
|
411
|
-
| Neptune | Vir | 26.03 | - | Sixth_House |
|
|
412
|
-
| Pluto | Leo | 4.19 | - | Fifth_House |
|
|
413
|
-
| Mean_Node | Lib | 10.58 | R | Sixth_House |
|
|
414
|
-
| Mean_South_Node | Ari | 10.58 | R | Twelfth_House |
|
|
415
|
-
| Mean_Lilith | Ari | 13.37 | - | Twelfth_House |
|
|
416
|
-
| Chiron | Leo | 0.57 | - | Fifth_House |
|
|
417
|
-
+-------------------+------+-------+------+----------------+
|
|
418
|
-
+----------------+------+----------+
|
|
419
|
-
| House | Sign | Position |
|
|
420
|
-
+----------------+------+----------+
|
|
421
|
-
| First_House | Ari | 19.72 |
|
|
422
|
-
| Second_House | Tau | 29.52 |
|
|
423
|
-
| Third_House | Gem | 20.23 |
|
|
424
|
-
| Fourth_House | Can | 7.07 |
|
|
425
|
-
| Fifth_House | Can | 25.31 |
|
|
426
|
-
| Sixth_House | Leo | 22.11 |
|
|
427
|
-
| Seventh_House | Lib | 19.72 |
|
|
428
|
-
| Eighth_House | Sco | 29.52 |
|
|
429
|
-
| Ninth_House | Sag | 20.23 |
|
|
430
|
-
| Tenth_House | Cap | 7.07 |
|
|
431
|
-
| Eleventh_House | Cap | 25.31 |
|
|
432
|
-
| Twelfth_House | Aqu | 22.11 |
|
|
433
|
-
+----------------+------+----------+
|
|
434
|
-
```
|
|
435
|
-
|
|
436
|
-
To export to a file:
|
|
510
|
+
ReportGenerator(subject).print_report(include_aspects=False)
|
|
437
511
|
|
|
438
|
-
|
|
439
|
-
|
|
512
|
+
# Single-chart data (elements, qualities, aspects enabled)
|
|
513
|
+
natal_data = ChartDataFactory.create_natal_chart_data(subject)
|
|
514
|
+
ReportGenerator(natal_data).print_report(max_aspects=10)
|
|
515
|
+
|
|
516
|
+
# Dual-chart data (synastry, transit, dual return, …)
|
|
517
|
+
partner = AstrologicalSubjectFactory.from_birth_data(
|
|
518
|
+
"Sample Partner", 1992, 11, 5, 9, 30, "Rome", "IT"
|
|
519
|
+
)
|
|
520
|
+
synastry_data = ChartDataFactory.create_synastry_chart_data(subject, partner)
|
|
521
|
+
ReportGenerator(synastry_data).print_report(max_aspects=12)
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
Each report contains:
|
|
525
|
+
- A chart-aware title summarising the subject(s) and chart type
|
|
526
|
+
- Birth/event metadata and configuration settings
|
|
527
|
+
- Celestial points with sign, position, **daily motion**, **declination**, retrograde flag, and house
|
|
528
|
+
- House cusp tables for every subject involved
|
|
529
|
+
- Lunar phase details when available
|
|
530
|
+
- Element/quality distributions and active configuration summaries (for chart data)
|
|
531
|
+
- Aspect listings tailored for single or dual charts, with symbols for type and movement
|
|
532
|
+
- Dual-chart extras such as house comparisons and relationship scores (when provided by the data)
|
|
533
|
+
|
|
534
|
+
### Section Access
|
|
535
|
+
|
|
536
|
+
All section helpers remain available for targeted output:
|
|
537
|
+
|
|
538
|
+
```python
|
|
539
|
+
report = ReportGenerator(natal_data)
|
|
540
|
+
print(report.get_subject_data_report())
|
|
541
|
+
print(report.get_celestial_points_report())
|
|
542
|
+
print(report.get_elements_report())
|
|
543
|
+
print(report.get_aspects_report(max_aspects=5))
|
|
440
544
|
```
|
|
441
545
|
|
|
546
|
+
Refer to the refreshed [Report Documentation](https://www.kerykeion.net/report/) for end-to-end examples covering every supported chart model.
|
|
547
|
+
|
|
442
548
|
## Example: Retrieving Aspects
|
|
443
549
|
|
|
444
550
|
Kerykeion provides a unified `AspectsFactory` class for calculating astrological aspects within single charts or between two charts:
|
|
@@ -499,7 +605,7 @@ johnny = AstrologicalSubjectFactory.from_birth_data(
|
|
|
499
605
|
|
|
500
606
|
More examples [here](https://www.kerykeion.net/docs//sidereal-modes/).
|
|
501
607
|
|
|
502
|
-
Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/kerykeion/
|
|
608
|
+
Full list of supported sidereal modes [here](https://www.kerykeion.net/pydocs/kerykeion/schemas/kr_literals.html#SiderealMode).
|
|
503
609
|
|
|
504
610
|
## House Systems
|
|
505
611
|
|
|
@@ -515,7 +621,7 @@ johnny = AstrologicalSubjectFactory.from_birth_data(
|
|
|
515
621
|
|
|
516
622
|
More examples [here](https://www.kerykeion.net/docs//houses-systems/).
|
|
517
623
|
|
|
518
|
-
Full list of supported house systems [here](https://www.kerykeion.net/pydocs/kerykeion/
|
|
624
|
+
Full list of supported house systems [here](https://www.kerykeion.net/pydocs/kerykeion/schemas/kr_literals.html#HousesSystem).
|
|
519
625
|
|
|
520
626
|
So far all the available houses system in the Swiss Ephemeris are supported but the Gauquelin Sectors.
|
|
521
627
|
|
|
@@ -533,7 +639,7 @@ johnny = AstrologicalSubjectFactory.from_birth_data(
|
|
|
533
639
|
|
|
534
640
|
More examples [here](https://www.kerykeion.net/docs//perspective-type/).
|
|
535
641
|
|
|
536
|
-
Full list of supported perspective types [here](https://www.kerykeion.net/pydocs/kerykeion/
|
|
642
|
+
Full list of supported perspective types [here](https://www.kerykeion.net/pydocs/kerykeion/schemas/kr_literals.html#PerspectiveType).
|
|
537
643
|
|
|
538
644
|
## Themes
|
|
539
645
|
|
|
@@ -549,11 +655,19 @@ Each theme offers a distinct visual style, allowing you to choose the one that b
|
|
|
549
655
|
Here's an example of how to set the theme:
|
|
550
656
|
|
|
551
657
|
```python
|
|
552
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
658
|
+
from kerykeion import AstrologicalSubjectFactory
|
|
659
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
660
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
553
661
|
|
|
662
|
+
# Step 1: Create subject
|
|
554
663
|
dark_theme_subject = AstrologicalSubjectFactory.from_birth_data("John Lennon - Dark Theme", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
555
|
-
|
|
556
|
-
|
|
664
|
+
|
|
665
|
+
# Step 2: Pre-compute chart data
|
|
666
|
+
chart_data = ChartDataFactory.create_natal_chart_data(dark_theme_subject)
|
|
667
|
+
|
|
668
|
+
# Step 3: Create visualization with dark high contrast theme
|
|
669
|
+
dark_theme_natal_chart = ChartDrawer(chart_data=chart_data, theme="dark_high_contrast")
|
|
670
|
+
dark_theme_natal_chart.save_svg()
|
|
557
671
|
```
|
|
558
672
|
|
|
559
673
|

|
|
@@ -587,16 +701,20 @@ Kerykeion supports both **True** and **Mean** Lunar Nodes:
|
|
|
587
701
|
- **Mean North Lunar Node**: `"mean_node"` (name kept without "north" for backward compatibility).
|
|
588
702
|
- **Mean South Lunar Node**: `"mean_south_node"`.
|
|
589
703
|
|
|
590
|
-
In instances of the classes used to generate aspects and SVG charts, only the mean nodes are active. To activate the true nodes, you need to pass the `active_points` parameter to the `
|
|
704
|
+
In instances of the classes used to generate aspects and SVG charts, only the mean nodes are active. To activate the true nodes, you need to pass the `active_points` parameter to the `ChartDataFactory` methods.
|
|
591
705
|
|
|
592
706
|
Example:
|
|
593
707
|
|
|
594
708
|
```python
|
|
595
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
709
|
+
from kerykeion import AstrologicalSubjectFactory
|
|
710
|
+
from kerykeion.chart_data_factory import ChartDataFactory
|
|
711
|
+
from kerykeion.charts.chart_drawer import ChartDrawer
|
|
596
712
|
|
|
713
|
+
# Step 1: Create subject
|
|
597
714
|
subject = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
598
715
|
|
|
599
|
-
chart
|
|
716
|
+
# Step 2: Pre-compute chart data with custom active points including true nodes
|
|
717
|
+
chart_data = ChartDataFactory.create_natal_chart_data(
|
|
600
718
|
subject,
|
|
601
719
|
active_points=[
|
|
602
720
|
"Sun",
|
|
@@ -619,7 +737,10 @@ chart = KerykeionChartSVG(
|
|
|
619
737
|
"Imum_Coeli"
|
|
620
738
|
]
|
|
621
739
|
)
|
|
622
|
-
|
|
740
|
+
|
|
741
|
+
# Step 3: Create visualization
|
|
742
|
+
chart = ChartDrawer(chart_data=chart_data)
|
|
743
|
+
chart.save_svg()
|
|
623
744
|
```
|
|
624
745
|
|
|
625
746
|
## JSON Support
|
|
@@ -642,6 +763,272 @@ You can find auto-generated documentation [here](https://www.kerykeion.net/pydoc
|
|
|
642
763
|
|
|
643
764
|
Clone the repository or download the ZIP via the GitHub interface.
|
|
644
765
|
|
|
766
|
+
## Kerykeion v5.0 – What's New
|
|
767
|
+
|
|
768
|
+
Kerykeion v5 is a **complete redesign** that modernizes the library with a data-first approach, factory-based architecture, and Pydantic 2 models. This version brings significant improvements in API design, type safety, and extensibility.
|
|
769
|
+
|
|
770
|
+
### 🎯 Key Highlights
|
|
771
|
+
|
|
772
|
+
#### Factory-Centered Architecture
|
|
773
|
+
The old class-based approach has been replaced with a modern factory pattern:
|
|
774
|
+
|
|
775
|
+
- **`AstrologicalSubjectFactory`**: Replaces the old `AstrologicalSubject` class
|
|
776
|
+
- **`ChartDataFactory`**: Pre-computes enriched chart data (elements, qualities, aspects)
|
|
777
|
+
- **`ChartDrawer`**: Pure SVG rendering separated from calculations
|
|
778
|
+
- **`AspectsFactory`**: Unified aspects calculation for natal and synastry charts
|
|
779
|
+
- **`PlanetaryReturnFactory`**: Solar and Lunar returns computation
|
|
780
|
+
- **`HouseComparisonFactory`**: House overlay analysis for synastry
|
|
781
|
+
- **`RelationshipScoreFactory`**: Compatibility scoring between charts
|
|
782
|
+
|
|
783
|
+
**Old v4 API:**
|
|
784
|
+
```python
|
|
785
|
+
from kerykeion import AstrologicalSubject, KerykeionChartSVG
|
|
786
|
+
|
|
787
|
+
# v4 - Class-based approach
|
|
788
|
+
subject = AstrologicalSubject("John", 1990, 1, 1, 12, 0, "London", "GB")
|
|
789
|
+
chart = KerykeionChartSVG(subject)
|
|
790
|
+
chart.makeSVG()
|
|
791
|
+
```
|
|
792
|
+
|
|
793
|
+
**New v5 API:**
|
|
794
|
+
```python
|
|
795
|
+
from kerykeion import AstrologicalSubjectFactory, ChartDataFactory, ChartDrawer
|
|
796
|
+
|
|
797
|
+
# v5 - Factory-based approach with separation of concerns
|
|
798
|
+
subject = AstrologicalSubjectFactory.from_birth_data("John", 1990, 1, 1, 12, 0, "London", "GB")
|
|
799
|
+
chart_data = ChartDataFactory.create_natal_chart_data(subject)
|
|
800
|
+
drawer = ChartDrawer(chart_data=chart_data)
|
|
801
|
+
drawer.save_svg()
|
|
802
|
+
```
|
|
803
|
+
|
|
804
|
+
#### Pydantic 2 Models & Type Safety
|
|
805
|
+
All data structures are now strongly typed Pydantic models:
|
|
806
|
+
|
|
807
|
+
- **`AstrologicalSubjectModel`**: Subject data with full validation
|
|
808
|
+
- **`ChartDataModel`**: Enriched chart data with elements, qualities, aspects
|
|
809
|
+
- **`SingleChartAspectsModel` / `DualChartAspectsModel`**: Typed aspect collections
|
|
810
|
+
- **`PlanetReturnModel`**: Planetary return data
|
|
811
|
+
- **`ElementDistributionModel`**: Element statistics (fire, earth, air, water)
|
|
812
|
+
- **`QualityDistributionModel`**: Quality statistics (cardinal, fixed, mutable)
|
|
813
|
+
|
|
814
|
+
All models support:
|
|
815
|
+
- JSON serialization/deserialization
|
|
816
|
+
- Dictionary export
|
|
817
|
+
- Subscript access
|
|
818
|
+
- Full IDE autocomplete and type checking
|
|
819
|
+
|
|
820
|
+
#### Enhanced Features
|
|
821
|
+
- **Speed & Declination**: All celestial points now include daily motion speed and declination
|
|
822
|
+
- **Element & Quality Analysis**: Automatic calculation of element/quality distributions
|
|
823
|
+
- **Relationship Scoring**: Built-in compatibility analysis for synastry
|
|
824
|
+
- **House Comparison**: Detailed house overlay analysis
|
|
825
|
+
- **Transit Time Ranges**: Advanced transit tracking over time periods
|
|
826
|
+
- **Report Module**: Comprehensive text reports with ASCII tables
|
|
827
|
+
|
|
828
|
+
### 🚨 Breaking Changes
|
|
829
|
+
|
|
830
|
+
#### 1. Removed Legacy Classes
|
|
831
|
+
The following classes have been **completely removed** and must be replaced:
|
|
832
|
+
|
|
833
|
+
| Removed (v4) | Replacement (v5) |
|
|
834
|
+
|--------------|------------------|
|
|
835
|
+
| `AstrologicalSubject` | `AstrologicalSubjectFactory.from_birth_data()` |
|
|
836
|
+
| `KerykeionChartSVG` | `ChartDrawer` + `ChartDataFactory` |
|
|
837
|
+
| `NatalAspects` | `AspectsFactory.single_chart_aspects()` |
|
|
838
|
+
| `SynastryAspects` | `AspectsFactory.dual_chart_aspects()` |
|
|
839
|
+
| `relationship_score()` | `RelationshipScoreFactory` |
|
|
840
|
+
|
|
841
|
+
**Note**: The `kerykeion.backword` module provides temporary wrappers for `AstrologicalSubject` and `KerykeionChartSVG` with deprecation warnings. These will be **removed in v6.0**.
|
|
842
|
+
|
|
843
|
+
#### 2. Import Changes
|
|
844
|
+
Module structure has been completely reorganized:
|
|
845
|
+
|
|
846
|
+
**Old imports (v4):**
|
|
847
|
+
```python
|
|
848
|
+
from kerykeion import AstrologicalSubject, KerykeionChartSVG
|
|
849
|
+
from kerykeion.kr_types import KerykeionException
|
|
850
|
+
```
|
|
851
|
+
|
|
852
|
+
**New imports (v5):**
|
|
853
|
+
```python
|
|
854
|
+
from kerykeion import AstrologicalSubjectFactory, ChartDataFactory, ChartDrawer
|
|
855
|
+
from kerykeion.schemas.kerykeion_exception import KerykeionException
|
|
856
|
+
```
|
|
857
|
+
|
|
858
|
+
#### 3. Lunar Nodes Naming
|
|
859
|
+
All lunar node fields have been renamed for clarity:
|
|
860
|
+
|
|
861
|
+
| Old Name (v4) | New Name (v5) |
|
|
862
|
+
|---------------|---------------|
|
|
863
|
+
| `Mean_Node` | `Mean_North_Lunar_Node` |
|
|
864
|
+
| `True_Node` | `True_North_Lunar_Node` |
|
|
865
|
+
| `Mean_South_Node` | `Mean_South_Lunar_Node` |
|
|
866
|
+
| `True_South_Node` | `True_South_Lunar_Node` |
|
|
867
|
+
|
|
868
|
+
**Migration example:**
|
|
869
|
+
```python
|
|
870
|
+
# v4
|
|
871
|
+
print(subject.mean_node)
|
|
872
|
+
|
|
873
|
+
# v5
|
|
874
|
+
print(subject.mean_north_lunar_node)
|
|
875
|
+
```
|
|
876
|
+
|
|
877
|
+
#### 4. Chart Generation Changes
|
|
878
|
+
The two-step process (data + rendering) is now required:
|
|
879
|
+
|
|
880
|
+
**Old v4:**
|
|
881
|
+
```python
|
|
882
|
+
chart = KerykeionChartSVG(subject)
|
|
883
|
+
chart.makeSVG()
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
**New v5:**
|
|
887
|
+
```python
|
|
888
|
+
chart_data = ChartDataFactory.create_natal_chart_data(subject)
|
|
889
|
+
drawer = ChartDrawer(chart_data=chart_data)
|
|
890
|
+
drawer.save_svg()
|
|
891
|
+
```
|
|
892
|
+
|
|
893
|
+
#### 5. Aspects API Changes
|
|
894
|
+
Aspects are now calculated through the factory:
|
|
895
|
+
|
|
896
|
+
**Old v4:**
|
|
897
|
+
```python
|
|
898
|
+
from kerykeion import NatalAspects, SynastryAspects
|
|
899
|
+
|
|
900
|
+
natal_aspects = NatalAspects(subject)
|
|
901
|
+
synastry_aspects = SynastryAspects(subject1, subject2)
|
|
902
|
+
```
|
|
903
|
+
|
|
904
|
+
**New v5:**
|
|
905
|
+
```python
|
|
906
|
+
from kerykeion import AspectsFactory
|
|
907
|
+
|
|
908
|
+
natal_aspects = AspectsFactory.single_chart_aspects(subject)
|
|
909
|
+
synastry_aspects = AspectsFactory.dual_chart_aspects(subject1, subject2)
|
|
910
|
+
```
|
|
911
|
+
|
|
912
|
+
### 🔄 Migration Guide
|
|
913
|
+
|
|
914
|
+
#### Using the Backward Compatibility Layer
|
|
915
|
+
|
|
916
|
+
For a gradual migration, use the `kerykeion.backword` module:
|
|
917
|
+
|
|
918
|
+
```python
|
|
919
|
+
from kerykeion import AstrologicalSubject # Legacy wrapper
|
|
920
|
+
|
|
921
|
+
subject = AstrologicalSubject("John Doe", 1990, 1, 1, 12, 0, "London", "GB")
|
|
922
|
+
|
|
923
|
+
# These still work but show DeprecationWarnings
|
|
924
|
+
print(subject.mean_node) # Maps to mean_north_lunar_node
|
|
925
|
+
print(subject.true_node) # Maps to true_north_lunar_node
|
|
926
|
+
```
|
|
927
|
+
|
|
928
|
+
**⚠️ Warning**: This compatibility layer will be **removed in v6.0**.
|
|
929
|
+
|
|
930
|
+
#### Step-by-Step Migration
|
|
931
|
+
|
|
932
|
+
1. **Update imports**
|
|
933
|
+
```python
|
|
934
|
+
# Old
|
|
935
|
+
from kerykeion import AstrologicalSubject, KerykeionChartSVG
|
|
936
|
+
|
|
937
|
+
# New
|
|
938
|
+
from kerykeion import AstrologicalSubjectFactory, ChartDataFactory, ChartDrawer
|
|
939
|
+
```
|
|
940
|
+
|
|
941
|
+
2. **Update subject creation**
|
|
942
|
+
```python
|
|
943
|
+
# Old
|
|
944
|
+
subject = AstrologicalSubject("John", 1990, 1, 1, 12, 0, "London", "GB")
|
|
945
|
+
|
|
946
|
+
# New
|
|
947
|
+
subject = AstrologicalSubjectFactory.from_birth_data("John", 1990, 1, 1, 12, 0, "London", "GB")
|
|
948
|
+
```
|
|
949
|
+
|
|
950
|
+
3. **Update chart generation**
|
|
951
|
+
```python
|
|
952
|
+
# Old
|
|
953
|
+
chart = KerykeionChartSVG(subject)
|
|
954
|
+
chart.makeSVG()
|
|
955
|
+
|
|
956
|
+
# New
|
|
957
|
+
chart_data = ChartDataFactory.create_natal_chart_data(subject)
|
|
958
|
+
drawer = ChartDrawer(chart_data=chart_data)
|
|
959
|
+
drawer.save_svg()
|
|
960
|
+
```
|
|
961
|
+
|
|
962
|
+
4. **Update field access** (lunar nodes)
|
|
963
|
+
```python
|
|
964
|
+
# Old
|
|
965
|
+
print(subject.mean_node.position)
|
|
966
|
+
|
|
967
|
+
# New
|
|
968
|
+
print(subject.mean_north_lunar_node.position)
|
|
969
|
+
```
|
|
970
|
+
|
|
971
|
+
5. **Update aspects**
|
|
972
|
+
```python
|
|
973
|
+
# Old
|
|
974
|
+
from kerykeion import NatalAspects
|
|
975
|
+
aspects = NatalAspects(subject)
|
|
976
|
+
|
|
977
|
+
# New
|
|
978
|
+
from kerykeion import AspectsFactory
|
|
979
|
+
aspects = AspectsFactory.single_chart_aspects(subject)
|
|
980
|
+
```
|
|
981
|
+
|
|
982
|
+
#### Automated Migration Script
|
|
983
|
+
|
|
984
|
+
Use this sed script to update Python files automatically:
|
|
985
|
+
|
|
986
|
+
```bash
|
|
987
|
+
# Update lunar node references
|
|
988
|
+
find . -name "*.py" -type f -exec sed -i.bak \
|
|
989
|
+
-e 's/\.mean_node/.mean_north_lunar_node/g' \
|
|
990
|
+
-e 's/\.true_node/.true_north_lunar_node/g' \
|
|
991
|
+
-e 's/\.mean_south_node/.mean_south_lunar_node/g' \
|
|
992
|
+
-e 's/\.true_south_node/.true_south_lunar_node/g' \
|
|
993
|
+
-e 's/"Mean_Node"/"Mean_North_Lunar_Node"/g' \
|
|
994
|
+
-e 's/"True_Node"/"True_North_Lunar_Node"/g' \
|
|
995
|
+
-e 's/"Mean_South_Node"/"Mean_South_Lunar_Node"/g' \
|
|
996
|
+
-e 's/"True_South_Node"/"True_South_Lunar_Node"/g' \
|
|
997
|
+
{} \;
|
|
998
|
+
```
|
|
999
|
+
|
|
1000
|
+
**Note**: Always review automated changes and test thoroughly before committing.
|
|
1001
|
+
|
|
1002
|
+
### 📦 Other Notable Changes
|
|
1003
|
+
|
|
1004
|
+
- **Packaging**: Migrated from Poetry to PEP 621 + Hatchling with `uv.lock`
|
|
1005
|
+
- **Settings**: Centralized in `kerykeion.schemas` and `kerykeion.settings`
|
|
1006
|
+
- **Configuration**: Legacy presets available in `settings/legacy/`
|
|
1007
|
+
- **Type System**: All literals consolidated in `kr_literals.py`
|
|
1008
|
+
- **Performance**: Caching improvements with `functools.lru_cache`
|
|
1009
|
+
- **Testing**: 376 tests with 87% coverage, regenerated fixtures for v5
|
|
1010
|
+
|
|
1011
|
+
### 🎨 New Themes
|
|
1012
|
+
|
|
1013
|
+
Additional chart themes added:
|
|
1014
|
+
- `classic` (default)
|
|
1015
|
+
- `dark`
|
|
1016
|
+
- `dark_high_contrast`
|
|
1017
|
+
- `light`
|
|
1018
|
+
- `strawberry`
|
|
1019
|
+
|
|
1020
|
+
### 📚 Resources
|
|
1021
|
+
|
|
1022
|
+
- **Full Release Notes**: [v5.0.0.md](release_notes/v5.0.0b1.md)
|
|
1023
|
+
- **Documentation**: [kerykeion.readthedocs.io](https://kerykeion.readthedocs.io)
|
|
1024
|
+
- **API Reference**: [kerykeion.net/pydocs](https://www.kerykeion.net/pydocs/kerykeion.html)
|
|
1025
|
+
- **Examples**: See the `examples/` folder for runnable code
|
|
1026
|
+
- **Support**: [GitHub Discussions](https://github.com/g-battaglia/kerykeion/discussions)
|
|
1027
|
+
|
|
1028
|
+
**Migration Timeline:**
|
|
1029
|
+
- **v5.0**: Current - Backward compatibility layer available
|
|
1030
|
+
- **v6.0**: Future - Compatibility layer will be removed
|
|
1031
|
+
|
|
645
1032
|
## Integrating Kerykeion into Your Project
|
|
646
1033
|
|
|
647
1034
|
If you would like to incorporate Kerykeion's astrological features into your application, please reach out via [email](mailto:kerykeion.astrology@gmail.com?subject=Integration%20Request). Whether you need custom features, support, or specialized consulting, I am happy to discuss potential collaborations.
|