lifeastroapi 0.1.0__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.
Files changed (37) hide show
  1. lifeastroapi/__init__.py +68 -0
  2. lifeastroapi/_client.py +227 -0
  3. lifeastroapi/_core.py +28 -0
  4. lifeastroapi/_http.py +282 -0
  5. lifeastroapi/_params.py +89 -0
  6. lifeastroapi/_version.py +3 -0
  7. lifeastroapi/errors.py +152 -0
  8. lifeastroapi/py.typed +0 -0
  9. lifeastroapi/resources/__init__.py +188 -0
  10. lifeastroapi/resources/ashtakavarga.py +279 -0
  11. lifeastroapi/resources/calendar.py +281 -0
  12. lifeastroapi/resources/chart.py +1781 -0
  13. lifeastroapi/resources/dasha.py +1009 -0
  14. lifeastroapi/resources/eclipses.py +215 -0
  15. lifeastroapi/resources/festivals.py +245 -0
  16. lifeastroapi/resources/geo.py +177 -0
  17. lifeastroapi/resources/horoscope.py +155 -0
  18. lifeastroapi/resources/lalkitab.py +219 -0
  19. lifeastroapi/resources/meta.py +239 -0
  20. lifeastroapi/resources/milan.py +969 -0
  21. lifeastroapi/resources/muhurta.py +737 -0
  22. lifeastroapi/resources/narrative.py +2719 -0
  23. lifeastroapi/resources/numerology.py +417 -0
  24. lifeastroapi/resources/panchang.py +1709 -0
  25. lifeastroapi/resources/planet_moments.py +265 -0
  26. lifeastroapi/resources/prashna.py +335 -0
  27. lifeastroapi/resources/remedies.py +579 -0
  28. lifeastroapi/resources/reports.py +845 -0
  29. lifeastroapi/resources/tarot.py +207 -0
  30. lifeastroapi/resources/transit.py +615 -0
  31. lifeastroapi/resources/varshaphal.py +501 -0
  32. lifeastroapi/resources/western.py +5569 -0
  33. lifeastroapi/types.py +128 -0
  34. lifeastroapi-0.1.0.dist-info/METADATA +465 -0
  35. lifeastroapi-0.1.0.dist-info/RECORD +37 -0
  36. lifeastroapi-0.1.0.dist-info/WHEEL +4 -0
  37. lifeastroapi-0.1.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,281 @@
1
+ # GENERATED by scripts/generate.py from the endpoint manifest. Do not edit by hand.
2
+ # Run `python scripts/generate.py` to regenerate.
3
+ """Hindu calendar: month, ritu, samvatsara, adhik maas, solstices."""
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Any
8
+
9
+ from .._core import AsyncCore, SyncCore
10
+ from .._params import put
11
+ from ..types import Ayanamsa, Locale, QueryParams, RequestOptions
12
+
13
+
14
+ class Calendar:
15
+ """Hindu calendar: month, ritu, samvatsara, adhik maas, solstices. Use ``client.calendar``."""
16
+
17
+ def __init__(self, client: SyncCore) -> None:
18
+ self._c = client
19
+
20
+ def adhik_maas(
21
+ self,
22
+ *,
23
+ year: int,
24
+ tz: str | None = None,
25
+ ayanamsa: Ayanamsa | None = None,
26
+ lang: Locale | None = None,
27
+ request_options: RequestOptions | None = None,
28
+ ) -> Any:
29
+ """Find the Adhik Maas (intercalary/leap month) in a given year — the extra lunar month
30
+ inserted to sync the Hindu lunar calendar with the solar year.
31
+
32
+ Cost: 20 credits per call.
33
+
34
+ ``GET /v1/calendar/adhik-maas``
35
+ """
36
+ _q: QueryParams = {}
37
+ put(_q, "year", year)
38
+ put(_q, "tz", tz)
39
+ put(_q, "ayanamsa", ayanamsa)
40
+ put(_q, "lang", lang)
41
+ put(_q, "locale", lang)
42
+ return self._c.request("/v1/calendar/adhik-maas", _q, request_options=request_options)
43
+
44
+ def month(
45
+ self,
46
+ *,
47
+ date: str,
48
+ tz: str,
49
+ ayanamsa: Ayanamsa | None = None,
50
+ lang: Locale | None = None,
51
+ request_options: RequestOptions | None = None,
52
+ ) -> Any:
53
+ """Get the Hindu calendar details for a Gregorian month — maps each day to its Hindu month
54
+ (Chaitra/Vaishakha/…), paksha (Shukla/Krishna), tithi, and Vikram Samvat year.
55
+
56
+ Cost: 10 credits per call.
57
+
58
+ ``GET /v1/calendar/month``
59
+ """
60
+ _q: QueryParams = {}
61
+ put(_q, "date", date)
62
+ put(_q, "tz", tz)
63
+ put(_q, "ayanamsa", ayanamsa)
64
+ put(_q, "lang", lang)
65
+ put(_q, "locale", lang)
66
+ return self._c.request("/v1/calendar/month", _q, request_options=request_options)
67
+
68
+ def ritu(
69
+ self,
70
+ *,
71
+ date: str,
72
+ tz: str,
73
+ ayanamsa: Ayanamsa | None = None,
74
+ lang: Locale | None = None,
75
+ request_options: RequestOptions | None = None,
76
+ ) -> Any:
77
+ """Get the current Hindu Ritu (season) for a date — one of 6 seasons: Vasanta (spring),
78
+ Grishma (summer), Varsha (monsoon), Sharad (autumn), Hemanta (pre-winter), Shishira
79
+ (winter).
80
+
81
+ Cost: 10 credits per call.
82
+
83
+ ``GET /v1/calendar/ritu``
84
+ """
85
+ _q: QueryParams = {}
86
+ put(_q, "date", date)
87
+ put(_q, "tz", tz)
88
+ put(_q, "ayanamsa", ayanamsa)
89
+ put(_q, "lang", lang)
90
+ put(_q, "locale", lang)
91
+ return self._c.request("/v1/calendar/ritu", _q, request_options=request_options)
92
+
93
+ def samvatsara(
94
+ self,
95
+ *,
96
+ date: str,
97
+ tz: str,
98
+ ayanamsa: Ayanamsa | None = None,
99
+ lang: Locale | None = None,
100
+ request_options: RequestOptions | None = None,
101
+ ) -> Any:
102
+ """Get the Samvatsara (Jupiter year) name for a given year — the 60-year Jupiter cycle used
103
+ in Hindu astrology (Prabhava, Vibhava, Shukla, … Akshaya).
104
+
105
+ Cost: 10 credits per call.
106
+
107
+ ``GET /v1/calendar/samvatsara``
108
+ """
109
+ _q: QueryParams = {}
110
+ put(_q, "date", date)
111
+ put(_q, "tz", tz)
112
+ put(_q, "ayanamsa", ayanamsa)
113
+ put(_q, "lang", lang)
114
+ put(_q, "locale", lang)
115
+ return self._c.request("/v1/calendar/samvatsara", _q, request_options=request_options)
116
+
117
+ def solstices(
118
+ self,
119
+ *,
120
+ year: int,
121
+ tz: str | None = None,
122
+ lat: float | None = None,
123
+ lon: float | None = None,
124
+ alt: float | None = None,
125
+ lang: Locale | None = None,
126
+ request_options: RequestOptions | None = None,
127
+ ) -> Any:
128
+ """Equinoxes and solstices of a year — exact moment (UTC + local), the ayana that begins
129
+ (tropical Dakshinayana at the June solstice, tropical Uttarayana at the December
130
+ solstice; the panchang's Uttarayana is Makara Sankranti), and with lat/lon the sunrise,
131
+ sunset and day length at that place.
132
+
133
+ Cost: 10 credits per call.
134
+
135
+ ``GET /v1/calendar/solstices``
136
+ """
137
+ _q: QueryParams = {}
138
+ put(_q, "year", year)
139
+ put(_q, "tz", tz)
140
+ put(_q, "lat", lat)
141
+ put(_q, "lon", lon)
142
+ put(_q, "alt", alt)
143
+ put(_q, "lang", lang)
144
+ put(_q, "locale", lang)
145
+ return self._c.request("/v1/calendar/solstices", _q, request_options=request_options)
146
+
147
+
148
+ class AsyncCalendar:
149
+ """Hindu calendar: month, ritu, samvatsara, adhik maas, solstices. Use ``client.calendar`` on
150
+ :class:`AsyncLifeAstro`.
151
+ """
152
+
153
+ def __init__(self, client: AsyncCore) -> None:
154
+ self._c = client
155
+
156
+ async def adhik_maas(
157
+ self,
158
+ *,
159
+ year: int,
160
+ tz: str | None = None,
161
+ ayanamsa: Ayanamsa | None = None,
162
+ lang: Locale | None = None,
163
+ request_options: RequestOptions | None = None,
164
+ ) -> Any:
165
+ """Find the Adhik Maas (intercalary/leap month) in a given year — the extra lunar month
166
+ inserted to sync the Hindu lunar calendar with the solar year.
167
+
168
+ Cost: 20 credits per call.
169
+
170
+ ``GET /v1/calendar/adhik-maas``
171
+ """
172
+ _q: QueryParams = {}
173
+ put(_q, "year", year)
174
+ put(_q, "tz", tz)
175
+ put(_q, "ayanamsa", ayanamsa)
176
+ put(_q, "lang", lang)
177
+ put(_q, "locale", lang)
178
+ return await self._c.request("/v1/calendar/adhik-maas", _q, request_options=request_options)
179
+
180
+ async def month(
181
+ self,
182
+ *,
183
+ date: str,
184
+ tz: str,
185
+ ayanamsa: Ayanamsa | None = None,
186
+ lang: Locale | None = None,
187
+ request_options: RequestOptions | None = None,
188
+ ) -> Any:
189
+ """Get the Hindu calendar details for a Gregorian month — maps each day to its Hindu month
190
+ (Chaitra/Vaishakha/…), paksha (Shukla/Krishna), tithi, and Vikram Samvat year.
191
+
192
+ Cost: 10 credits per call.
193
+
194
+ ``GET /v1/calendar/month``
195
+ """
196
+ _q: QueryParams = {}
197
+ put(_q, "date", date)
198
+ put(_q, "tz", tz)
199
+ put(_q, "ayanamsa", ayanamsa)
200
+ put(_q, "lang", lang)
201
+ put(_q, "locale", lang)
202
+ return await self._c.request("/v1/calendar/month", _q, request_options=request_options)
203
+
204
+ async def ritu(
205
+ self,
206
+ *,
207
+ date: str,
208
+ tz: str,
209
+ ayanamsa: Ayanamsa | None = None,
210
+ lang: Locale | None = None,
211
+ request_options: RequestOptions | None = None,
212
+ ) -> Any:
213
+ """Get the current Hindu Ritu (season) for a date — one of 6 seasons: Vasanta (spring),
214
+ Grishma (summer), Varsha (monsoon), Sharad (autumn), Hemanta (pre-winter), Shishira
215
+ (winter).
216
+
217
+ Cost: 10 credits per call.
218
+
219
+ ``GET /v1/calendar/ritu``
220
+ """
221
+ _q: QueryParams = {}
222
+ put(_q, "date", date)
223
+ put(_q, "tz", tz)
224
+ put(_q, "ayanamsa", ayanamsa)
225
+ put(_q, "lang", lang)
226
+ put(_q, "locale", lang)
227
+ return await self._c.request("/v1/calendar/ritu", _q, request_options=request_options)
228
+
229
+ async def samvatsara(
230
+ self,
231
+ *,
232
+ date: str,
233
+ tz: str,
234
+ ayanamsa: Ayanamsa | None = None,
235
+ lang: Locale | None = None,
236
+ request_options: RequestOptions | None = None,
237
+ ) -> Any:
238
+ """Get the Samvatsara (Jupiter year) name for a given year — the 60-year Jupiter cycle used
239
+ in Hindu astrology (Prabhava, Vibhava, Shukla, … Akshaya).
240
+
241
+ Cost: 10 credits per call.
242
+
243
+ ``GET /v1/calendar/samvatsara``
244
+ """
245
+ _q: QueryParams = {}
246
+ put(_q, "date", date)
247
+ put(_q, "tz", tz)
248
+ put(_q, "ayanamsa", ayanamsa)
249
+ put(_q, "lang", lang)
250
+ put(_q, "locale", lang)
251
+ return await self._c.request("/v1/calendar/samvatsara", _q, request_options=request_options)
252
+
253
+ async def solstices(
254
+ self,
255
+ *,
256
+ year: int,
257
+ tz: str | None = None,
258
+ lat: float | None = None,
259
+ lon: float | None = None,
260
+ alt: float | None = None,
261
+ lang: Locale | None = None,
262
+ request_options: RequestOptions | None = None,
263
+ ) -> Any:
264
+ """Equinoxes and solstices of a year — exact moment (UTC + local), the ayana that begins
265
+ (tropical Dakshinayana at the June solstice, tropical Uttarayana at the December
266
+ solstice; the panchang's Uttarayana is Makara Sankranti), and with lat/lon the sunrise,
267
+ sunset and day length at that place.
268
+
269
+ Cost: 10 credits per call.
270
+
271
+ ``GET /v1/calendar/solstices``
272
+ """
273
+ _q: QueryParams = {}
274
+ put(_q, "year", year)
275
+ put(_q, "tz", tz)
276
+ put(_q, "lat", lat)
277
+ put(_q, "lon", lon)
278
+ put(_q, "alt", alt)
279
+ put(_q, "lang", lang)
280
+ put(_q, "locale", lang)
281
+ return await self._c.request("/v1/calendar/solstices", _q, request_options=request_options)