-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
52 lines (41 loc) · 1.68 KB
/
Copy pathexample.py
File metadata and controls
52 lines (41 loc) · 1.68 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
"""
Transit Forecast API: the astrology transits ahead for one birth chart over a
window up to 90 days. Every transit to natal aspect, sign ingress, retrograde or
direct station, eclipse, and new and full moon, each refined to its exact instant
and significance scored. Roxy Ephemeris, verified against NASA JPL Horizons.
The forecast is driven by the birth instant, so no coordinates are needed.
"""
import os
from collections import Counter
from roxy_sdk import create_roxy
roxy = create_roxy(os.environ["ROXY_API_KEY"])
def main():
result = roxy.forecast.forecast_transits(
birth_data={
"date": "1990-07-15",
"time": "13:30:00",
"timezone": "America/New_York",
},
start_date="2026-07-08",
end_date="2026-10-05",
min_significance=40,
)
print(f"Window: {result['startDate']} to {result['endDate']}")
print(f"Events in this transit forecast: {result['count']}")
by_type = Counter(e["type"] for e in result["events"])
print("\nBy event type:")
for event_type, n in by_type.items():
print(f" {event_type:<20} {n}")
print("\nFirst 8 events:")
for e in result["events"][:8]:
if e.get("aspect"):
detail = f"{e['aspect']} natal {e['target']}"
else:
detail = e.get("station") or e.get("phase") or e.get("kind") or e.get("target") or ""
print(f" {e['date']} {e['body']:<10} {detail:<24} sig {e['significance']}")
top = max(result["events"], key=lambda e: e["significance"])
print("\nMost significant upcoming event:")
print(f" {top['date']} ({top['datetime']})")
print(f" {top['description']}")
if __name__ == "__main__":
main()