Repository navigation
Expand file tree
/
Copy pathfactory.py
More file actions
6959 lines (6363 loc) · 337 KB
/
Copy pathfactory.py
File metadata and controls
6959 lines (6363 loc) · 337 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""
AUTO-GENERATED by codegen.py from OpenAPI spec. Do not edit manually.
Regenerate with: python generate.py
"""
from __future__ import annotations
from typing import Any
import httpx
from roxy_sdk.version import VERSION
_BASE_URL = "https://roxyapi.com/api/v2"
class RoxyAPIError(Exception):
"""Error returned by the RoxyAPI."""
def __init__(self, error: str, code: str, status_code: int) -> None:
self.error = error
self.code = code
self.status_code = status_code
super().__init__(f"[{status_code}] {code}: {error}")
def __repr__(self) -> str:
return f"RoxyAPIError(error={self.error!r}, code={self.code!r}, status_code={self.status_code})"
def _default_headers(api_key: str) -> dict[str, str]:
return {
"X-API-Key": api_key,
"X-SDK-Client": f"roxy-sdk-python/{VERSION}",
"Accept": "application/json",
}
def _handle_response(resp: httpx.Response) -> Any:
"""Parse response, raising RoxyAPIError on 4xx/5xx."""
if resp.status_code >= 400:
try:
body = resp.json()
except Exception:
body = {}
raise RoxyAPIError(
error=body.get("error", resp.text or "Unknown error"),
code=body.get("code", "unknown"),
status_code=resp.status_code,
)
return resp.json()
class _BaseDomain:
"""Base class for all domain namespaces."""
def __init__(self, client: httpx.Client, async_client: httpx.AsyncClient) -> None:
self._client = client
self._async_client = async_client
def _get(self, path: str, params: dict[str, Any] | None = None) -> Any:
return _handle_response(self._client.get(path, params=params))
async def _get_async(self, path: str, params: dict[str, Any] | None = None) -> Any:
return _handle_response(await self._async_client.get(path, params=params))
def _post(self, path: str, body: dict[str, Any] | None = None, params: dict[str, Any] | None = None) -> Any:
return _handle_response(self._client.post(path, json=body, params=params))
async def _post_async(self, path: str, body: dict[str, Any] | None = None, params: dict[str, Any] | None = None) -> Any:
return _handle_response(await self._async_client.post(path, json=body, params=params))
class AstrologyDomain(_BaseDomain):
"""Western astrology API for natal birth charts, daily, weekly, monthly, and yearly horoscopes with unique content per s..."""
def calculate_arabic_lots(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, house_system: str | None = None, lang: str | None = None) -> Any:
"""Arabic lots calculator - seven Hermetic parts including Part of Fortune and Spirit"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/arabic-lots", body, params=params or None)
async def calculate_arabic_lots_async(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, house_system: str | None = None, lang: str | None = None) -> Any:
"""Arabic lots calculator - seven Hermetic parts including Part of Fortune and Spirit (async)"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/arabic-lots", body, params=params or None)
def calculate_aspects(self, *, date: str, time: str, timezone: str, planets: list[str] | None = None, aspect_types: list[str] | None = None, lang: str | None = None) -> Any:
"""Calculate planetary aspects - Aspect finder for any date and time"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["timezone"] = timezone
if planets is not None:
body["planets"] = planets
if aspect_types is not None:
body["aspectTypes"] = aspect_types
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/aspects", body, params=params or None)
async def calculate_aspects_async(self, *, date: str, time: str, timezone: str, planets: list[str] | None = None, aspect_types: list[str] | None = None, lang: str | None = None) -> Any:
"""Calculate planetary aspects - Aspect finder for any date and time (async)"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["timezone"] = timezone
if planets is not None:
body["planets"] = planets
if aspect_types is not None:
body["aspectTypes"] = aspect_types
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/aspects", body, params=params or None)
def calculate_compatibility(self, *, person1: dict[str, Any], person2: dict[str, Any], lang: str | None = None) -> Any:
"""Compatibility score - Relationship compatibility API"""
body: dict[str, Any] = {}
body["person1"] = person1
body["person2"] = person2
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/compatibility-score", body, params=params or None)
async def calculate_compatibility_async(self, *, person1: dict[str, Any], person2: dict[str, Any], lang: str | None = None) -> Any:
"""Compatibility score - Relationship compatibility API (async)"""
body: dict[str, Any] = {}
body["person1"] = person1
body["person2"] = person2
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/compatibility-score", body, params=params or None)
def calculate_houses(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, house_system: str | None = None, lang: str | None = None) -> Any:
"""Calculate house cusps - House system calculator with comparison"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/houses", body, params=params or None)
async def calculate_houses_async(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, house_system: str | None = None, lang: str | None = None) -> Any:
"""Calculate house cusps - House system calculator with comparison (async)"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/houses", body, params=params or None)
def calculate_synastry(self, *, person1: dict[str, Any], person2: dict[str, Any], house_system: str | None = None, lang: str | None = None) -> Any:
"""Calculate synastry - Relationship compatibility analysis API"""
body: dict[str, Any] = {}
body["person1"] = person1
body["person2"] = person2
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/synastry", body, params=params or None)
async def calculate_synastry_async(self, *, person1: dict[str, Any], person2: dict[str, Any], house_system: str | None = None, lang: str | None = None) -> Any:
"""Calculate synastry - Relationship compatibility analysis API (async)"""
body: dict[str, Any] = {}
body["person1"] = person1
body["person2"] = person2
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/synastry", body, params=params or None)
def calculate_transit_aspects(self, *, natal_chart: dict[str, Any], transit_date: str | None = None, transit_time: str | None = None, planets: list[str] | None = None, aspect_types: list[str] | None = None, min_strength: float | None = None, house_system: str | None = None, lang: str | None = None) -> Any:
"""Transit Aspects - Detailed transit-to-natal aspect analysis with interpretations"""
body: dict[str, Any] = {}
body["natalChart"] = natal_chart
if transit_date is not None:
body["transitDate"] = transit_date
if transit_time is not None:
body["transitTime"] = transit_time
if planets is not None:
body["planets"] = planets
if aspect_types is not None:
body["aspectTypes"] = aspect_types
if min_strength is not None:
body["minStrength"] = min_strength
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/transit-aspects", body, params=params or None)
async def calculate_transit_aspects_async(self, *, natal_chart: dict[str, Any], transit_date: str | None = None, transit_time: str | None = None, planets: list[str] | None = None, aspect_types: list[str] | None = None, min_strength: float | None = None, house_system: str | None = None, lang: str | None = None) -> Any:
"""Transit Aspects - Detailed transit-to-natal aspect analysis with interpretations (async)"""
body: dict[str, Any] = {}
body["natalChart"] = natal_chart
if transit_date is not None:
body["transitDate"] = transit_date
if transit_time is not None:
body["transitTime"] = transit_time
if planets is not None:
body["planets"] = planets
if aspect_types is not None:
body["aspectTypes"] = aspect_types
if min_strength is not None:
body["minStrength"] = min_strength
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/transit-aspects", body, params=params or None)
def calculate_transits(self, *, date: str | None = None, time: str | None = None, timezone: str | None = None, node_type: str | None = None, natal_chart: dict[str, Any] | None = None, lang: str | None = None) -> Any:
"""Calculate planetary transits - Current transits with natal chart comparison"""
body: dict[str, Any] = {}
if date is not None:
body["date"] = date
if time is not None:
body["time"] = time
if timezone is not None:
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
if natal_chart is not None:
body["natalChart"] = natal_chart
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/transits", body, params=params or None)
async def calculate_transits_async(self, *, date: str | None = None, time: str | None = None, timezone: str | None = None, node_type: str | None = None, natal_chart: dict[str, Any] | None = None, lang: str | None = None) -> Any:
"""Calculate planetary transits - Current transits with natal chart comparison (async)"""
body: dict[str, Any] = {}
if date is not None:
body["date"] = date
if time is not None:
body["time"] = time
if timezone is not None:
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
if natal_chart is not None:
body["natalChart"] = natal_chart
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/transits", body, params=params or None)
def detect_aspect_patterns(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, strict_orbs: str | None = None, include: str | None = None, lang: str | None = None) -> Any:
"""Detect aspect patterns - Grand Trine, Kite, T-Square, Grand Cross, Yod, Mystic Rectangle, Stellium"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/aspect-patterns", body, params=params or None)
async def detect_aspect_patterns_async(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, strict_orbs: str | None = None, include: str | None = None, lang: str | None = None) -> Any:
"""Detect aspect patterns - Grand Trine, Kite, T-Square, Grand Cross, Yod, Mystic Rectangle, Stellium (async)"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/aspect-patterns", body, params=params or None)
def generate_asteroids(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, house_system: str | None = None, lang: str | None = None) -> Any:
"""Asteroid goddesses calculator - Ceres, Pallas, Juno, and Vesta natal positions"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/asteroids", body, params=params or None)
async def generate_asteroids_async(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, house_system: str | None = None, lang: str | None = None) -> Any:
"""Asteroid goddesses calculator - Ceres, Pallas, Juno, and Vesta natal positions (async)"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/asteroids", body, params=params or None)
def generate_astrocartography(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, include: str | None = None, lang: str | None = None) -> Any:
"""Astrocartography map - planetary lines and relocation calculator"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/astrocartography", body, params=params or None)
async def generate_astrocartography_async(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, include: str | None = None, lang: str | None = None) -> Any:
"""Astrocartography map - planetary lines and relocation calculator (async)"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/astrocartography", body, params=params or None)
def generate_composite_chart(self, *, person1: dict[str, Any], person2: dict[str, Any], house_system: str | None = None, lang: str | None = None) -> Any:
"""Composite Chart - Midpoint relationship chart with interpretations"""
body: dict[str, Any] = {}
body["person1"] = person1
body["person2"] = person2
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/composite-chart", body, params=params or None)
async def generate_composite_chart_async(self, *, person1: dict[str, Any], person2: dict[str, Any], house_system: str | None = None, lang: str | None = None) -> Any:
"""Composite Chart - Midpoint relationship chart with interpretations (async)"""
body: dict[str, Any] = {}
body["person1"] = person1
body["person2"] = person2
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/composite-chart", body, params=params or None)
def generate_fixed_stars(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, orb: float | None = None, lang: str | None = None) -> Any:
"""Fixed stars and star conjunctions calculator - Regulus, Spica, Algol natal report"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/fixed-stars", body, params=params or None)
async def generate_fixed_stars_async(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, orb: float | None = None, lang: str | None = None) -> Any:
"""Fixed stars and star conjunctions calculator - Regulus, Spica, Algol natal report (async)"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/fixed-stars", body, params=params or None)
def generate_lilith(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, house_system: str | None = None, lang: str | None = None) -> Any:
"""Black Moon Lilith calculator - mean and true lunar apogee in the natal chart"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/lilith", body, params=params or None)
async def generate_lilith_async(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, house_system: str | None = None, lang: str | None = None) -> Any:
"""Black Moon Lilith calculator - mean and true lunar apogee in the natal chart (async)"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/lilith", body, params=params or None)
def generate_local_space(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, include: str | None = None, lang: str | None = None) -> Any:
"""Local space astrology map - Directional planetary compass lines"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/local-space", body, params=params or None)
async def generate_local_space_async(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, include: str | None = None, lang: str | None = None) -> Any:
"""Local space astrology map - Directional planetary compass lines (async)"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/local-space", body, params=params or None)
def generate_lunar_return(self, *, birth_date: str, birth_time: str, return_date: str, latitude: float, longitude: float, timezone: str, house_system: str | None = None, lang: str | None = None) -> Any:
"""Lunar Return Chart - Monthly emotional forecast with Moon cycle chart"""
body: dict[str, Any] = {}
body["birthDate"] = birth_date
body["birthTime"] = birth_time
body["returnDate"] = return_date
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/lunar-return", body, params=params or None)
async def generate_lunar_return_async(self, *, birth_date: str, birth_time: str, return_date: str, latitude: float, longitude: float, timezone: str, house_system: str | None = None, lang: str | None = None) -> Any:
"""Lunar Return Chart - Monthly emotional forecast with Moon cycle chart (async)"""
body: dict[str, Any] = {}
body["birthDate"] = birth_date
body["birthTime"] = birth_time
body["returnDate"] = return_date
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/lunar-return", body, params=params or None)
def generate_natal_chart(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, house_system: str | None = None, lang: str | None = None) -> Any:
"""Generate natal chart - Birth chart calculator API with houses and aspects"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/natal-chart", body, params=params or None)
async def generate_natal_chart_async(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, house_system: str | None = None, lang: str | None = None) -> Any:
"""Generate natal chart - Birth chart calculator API with houses and aspects (async)"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/natal-chart", body, params=params or None)
def generate_planetary_return(self, *, birth_date: str, birth_time: str, planet: str, approximate_date: str, latitude: float, longitude: float, timezone: str, house_system: str | None = None, lang: str | None = None) -> Any:
"""Planetary Return Chart - Saturn return, Jupiter return, and inner planet cycles"""
body: dict[str, Any] = {}
body["birthDate"] = birth_date
body["birthTime"] = birth_time
body["planet"] = planet
body["approximateDate"] = approximate_date
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/planetary-returns", body, params=params or None)
async def generate_planetary_return_async(self, *, birth_date: str, birth_time: str, planet: str, approximate_date: str, latitude: float, longitude: float, timezone: str, house_system: str | None = None, lang: str | None = None) -> Any:
"""Planetary Return Chart - Saturn return, Jupiter return, and inner planet cycles (async)"""
body: dict[str, Any] = {}
body["birthDate"] = birth_date
body["birthTime"] = birth_time
body["planet"] = planet
body["approximateDate"] = approximate_date
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/planetary-returns", body, params=params or None)
def generate_profections(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, target_date: str, house_system: str | None = None, lang: str | None = None) -> Any:
"""Annual profections calculator - lord of the year and yearly time lord by age"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
body["targetDate"] = target_date
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/profections", body, params=params or None)
async def generate_profections_async(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, target_date: str, house_system: str | None = None, lang: str | None = None) -> Any:
"""Annual profections calculator - lord of the year and yearly time lord by age (async)"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
body["targetDate"] = target_date
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/profections", body, params=params or None)
def generate_progressions(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, target_date: str, lang: str | None = None) -> Any:
"""Secondary progressions calculator - progressed chart, progressed Sun and Moon"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
body["targetDate"] = target_date
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/progressions", body, params=params or None)
async def generate_progressions_async(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, target_date: str, lang: str | None = None) -> Any:
"""Secondary progressions calculator - progressed chart, progressed Sun and Moon (async)"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
body["targetDate"] = target_date
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/progressions", body, params=params or None)
def generate_relocation_chart(self, *, date: str, time: str, timezone: str, birth_latitude: float, birth_longitude: float, relocation_latitude: float, relocation_longitude: float, house_system: str | None = None, lang: str | None = None) -> Any:
"""Generate relocation chart - Relocated birth chart calculator with shifted houses and angles"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["timezone"] = timezone
body["birthLatitude"] = birth_latitude
body["birthLongitude"] = birth_longitude
body["relocationLatitude"] = relocation_latitude
body["relocationLongitude"] = relocation_longitude
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/relocation-chart", body, params=params or None)
async def generate_relocation_chart_async(self, *, date: str, time: str, timezone: str, birth_latitude: float, birth_longitude: float, relocation_latitude: float, relocation_longitude: float, house_system: str | None = None, lang: str | None = None) -> Any:
"""Generate relocation chart - Relocated birth chart calculator with shifted houses and angles (async)"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["timezone"] = timezone
body["birthLatitude"] = birth_latitude
body["birthLongitude"] = birth_longitude
body["relocationLatitude"] = relocation_latitude
body["relocationLongitude"] = relocation_longitude
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/relocation-chart", body, params=params or None)
def generate_solar_arc(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, target_date: str, lang: str | None = None) -> Any:
"""Solar arc directions calculator - directed chart at one degree per year"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
body["targetDate"] = target_date
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/solar-arc", body, params=params or None)
async def generate_solar_arc_async(self, *, date: str, time: str, latitude: float, longitude: float, timezone: str, node_type: str | None = None, target_date: str, lang: str | None = None) -> Any:
"""Solar arc directions calculator - directed chart at one degree per year (async)"""
body: dict[str, Any] = {}
body["date"] = date
body["time"] = time
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
body["targetDate"] = target_date
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/solar-arc", body, params=params or None)
def generate_solar_return(self, *, birth_date: str, birth_time: str, return_year: int, latitude: float, longitude: float, timezone: str, house_system: str | None = None, lang: str | None = None) -> Any:
"""Solar Return Chart - Annual birthday forecast with relocated chart"""
body: dict[str, Any] = {}
body["birthDate"] = birth_date
body["birthTime"] = birth_time
body["returnYear"] = return_year
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/solar-return", body, params=params or None)
async def generate_solar_return_async(self, *, birth_date: str, birth_time: str, return_year: int, latitude: float, longitude: float, timezone: str, house_system: str | None = None, lang: str | None = None) -> Any:
"""Solar Return Chart - Annual birthday forecast with relocated chart (async)"""
body: dict[str, Any] = {}
body["birthDate"] = birth_date
body["birthTime"] = birth_time
body["returnYear"] = return_year
body["latitude"] = latitude
body["longitude"] = longitude
body["timezone"] = timezone
if house_system is not None:
body["houseSystem"] = house_system
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/solar-return", body, params=params or None)
def get_current_moon_phase(self, *, date: str | None = None, time: str | None = None, timezone: str | None = None, lang: str | None = None) -> Any:
"""Get current moon phase - Lunar phase calculator with zodiac sign"""
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
if date is not None:
params["date"] = date
if time is not None:
params["time"] = time
if timezone is not None:
params["timezone"] = timezone
return self._get(f"/astrology/moon-phase/current", params=params or None)
async def get_current_moon_phase_async(self, *, date: str | None = None, time: str | None = None, timezone: str | None = None, lang: str | None = None) -> Any:
"""Get current moon phase - Lunar phase calculator with zodiac sign (async)"""
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
if date is not None:
params["date"] = date
if time is not None:
params["time"] = time
if timezone is not None:
params["timezone"] = timezone
return await self._get_async(f"/astrology/moon-phase/current", params=params or None)
def get_daily_horoscope(self, *, sign: str, date: str | None = None, timezone: str | None = None, lang: str | None = None) -> Any:
"""Daily horoscope by zodiac sign - Transit-based editorial columns"""
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
if date is not None:
params["date"] = date
if timezone is not None:
params["timezone"] = timezone
return self._get(f"/astrology/horoscope/{sign}/daily", params=params or None)
async def get_daily_horoscope_async(self, *, sign: str, date: str | None = None, timezone: str | None = None, lang: str | None = None) -> Any:
"""Daily horoscope by zodiac sign - Transit-based editorial columns (async)"""
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
if date is not None:
params["date"] = date
if timezone is not None:
params["timezone"] = timezone
return await self._get_async(f"/astrology/horoscope/{sign}/daily", params=params or None)
def get_monthly_declination_parallels(self, *, year: int | None = None, month: int | None = None, timezone: str | None = None, orb: float | None = None, node_type: str | None = None, lang: str | None = None) -> Any:
"""Monthly Parallels - Declination contacts for an entire month"""
body: dict[str, Any] = {}
if year is not None:
body["year"] = year
if month is not None:
body["month"] = month
if timezone is not None:
body["timezone"] = timezone
if orb is not None:
body["orb"] = orb
if node_type is not None:
body["nodeType"] = node_type
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/parallels/monthly", body, params=params or None)
async def get_monthly_declination_parallels_async(self, *, year: int | None = None, month: int | None = None, timezone: str | None = None, orb: float | None = None, node_type: str | None = None, lang: str | None = None) -> Any:
"""Monthly Parallels - Declination contacts for an entire month (async)"""
body: dict[str, Any] = {}
if year is not None:
body["year"] = year
if month is not None:
body["month"] = month
if timezone is not None:
body["timezone"] = timezone
if orb is not None:
body["orb"] = orb
if node_type is not None:
body["nodeType"] = node_type
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/parallels/monthly", body, params=params or None)
def get_monthly_horoscope(self, *, sign: str, date: str | None = None, timezone: str | None = None, lang: str | None = None) -> Any:
"""Monthly horoscope by zodiac sign - Editorial column with key dates"""
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
if date is not None:
params["date"] = date
if timezone is not None:
params["timezone"] = timezone
return self._get(f"/astrology/horoscope/{sign}/monthly", params=params or None)
async def get_monthly_horoscope_async(self, *, sign: str, date: str | None = None, timezone: str | None = None, lang: str | None = None) -> Any:
"""Monthly horoscope by zodiac sign - Editorial column with key dates (async)"""
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
if date is not None:
params["date"] = date
if timezone is not None:
params["timezone"] = timezone
return await self._get_async(f"/astrology/horoscope/{sign}/monthly", params=params or None)
def get_monthly_tropical_aspects(self, *, year: int | None = None, month: int | None = None, timezone: str | None = None, node_type: str | None = None, lang: str | None = None) -> Any:
"""Monthly Aspects - Tropical aspect calendar for an entire month"""
body: dict[str, Any] = {}
if year is not None:
body["year"] = year
if month is not None:
body["month"] = month
if timezone is not None:
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/aspects/monthly", body, params=params or None)
async def get_monthly_tropical_aspects_async(self, *, year: int | None = None, month: int | None = None, timezone: str | None = None, node_type: str | None = None, lang: str | None = None) -> Any:
"""Monthly Aspects - Tropical aspect calendar for an entire month (async)"""
body: dict[str, Any] = {}
if year is not None:
body["year"] = year
if month is not None:
body["month"] = month
if timezone is not None:
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/aspects/monthly", body, params=params or None)
def get_monthly_tropical_ephemeris(self, *, year: int | None = None, month: int | None = None, lang: str | None = None) -> Any:
"""Monthly Ephemeris - Daily tropical planetary positions for a month"""
body: dict[str, Any] = {}
if year is not None:
body["year"] = year
if month is not None:
body["month"] = month
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/planets/monthly", body, params=params or None)
async def get_monthly_tropical_ephemeris_async(self, *, year: int | None = None, month: int | None = None, lang: str | None = None) -> Any:
"""Monthly Ephemeris - Daily tropical planetary positions for a month (async)"""
body: dict[str, Any] = {}
if year is not None:
body["year"] = year
if month is not None:
body["month"] = month
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/planets/monthly", body, params=params or None)
def get_monthly_tropical_transits(self, *, year: int | None = None, month: int | None = None, timezone: str | None = None, node_type: str | None = None, lang: str | None = None) -> Any:
"""Monthly Transits - Tropical sign ingresses for an entire month"""
body: dict[str, Any] = {}
if year is not None:
body["year"] = year
if month is not None:
body["month"] = month
if timezone is not None:
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/transits/monthly", body, params=params or None)
async def get_monthly_tropical_transits_async(self, *, year: int | None = None, month: int | None = None, timezone: str | None = None, node_type: str | None = None, lang: str | None = None) -> Any:
"""Monthly Transits - Tropical sign ingresses for an entire month (async)"""
body: dict[str, Any] = {}
if year is not None:
body["year"] = year
if month is not None:
body["month"] = month
if timezone is not None:
body["timezone"] = timezone
if node_type is not None:
body["nodeType"] = node_type
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._post_async(f"/astrology/transits/monthly", body, params=params or None)
def get_moon_calendar(self, *, year: str, month: str, lang: str | None = None) -> Any:
"""Get lunar calendar - Moon phases for entire month"""
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._get(f"/astrology/moon-phase/calendar/{year}/{month}", params=params or None)
async def get_moon_calendar_async(self, *, year: str, month: str, lang: str | None = None) -> Any:
"""Get lunar calendar - Moon phases for entire month (async)"""
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._get_async(f"/astrology/moon-phase/calendar/{year}/{month}", params=params or None)
def get_planet_meaning(self, *, id: str, lang: str | None = None) -> Any:
"""Get planet meaning details - Complete astrology planet interpretation"""
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._get(f"/astrology/planet-meanings/{id}", params=params or None)
async def get_planet_meaning_async(self, *, id: str, lang: str | None = None) -> Any:
"""Get planet meaning details - Complete astrology planet interpretation (async)"""
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return await self._get_async(f"/astrology/planet-meanings/{id}", params=params or None)
def get_planetary_node_passages(self, *, year: int, timezone: str | None = None, lang: str | None = None) -> Any:
"""Ecliptic Crossings - Node passages for a whole year"""
body: dict[str, Any] = {}
body["year"] = year
if timezone is not None:
body["timezone"] = timezone
params: dict[str, Any] = {}
if lang is not None:
params["lang"] = lang
return self._post(f"/astrology/ecliptic-crossings", body, params=params or None)
async def get_planetary_node_passages_async(self, *, year: int, timezone: str | None = None, lang: str | None = None) -> Any:
"""Ecliptic Crossings - Node passages for a whole year (async)"""