You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: sync README and AGENTS with canonical domain order, drop unused author email
Reorder domains to Western, Vedic, Numerology, Tarot, Biorhythm,
I Ching, Crystals, Dreams, Angel Numbers, Location, Usage. Add
Location-first rule for any coordinate dependent endpoint.
AGENTS gains a Field formats that trip agents table covering
timezone decimal hours (5.5 IST, 5.75 NPT), date and time formats,
latitude longitude decimals, enum values, slugs, and nested person
dicts. Timezone cheat sheet covers 24 regions with DST offsets.
Common tasks table reordered by domain priority. MCP equivalents
section added linking REST paths to per domain MCP tools.
Drop unused authors block from pyproject.toml. PyPI does not
require it and the placeholder email was wrong.
`create_roxy` sets the base URL (`https://roxyapi.com/api/v2`) and auth header automatically. Returns a `Roxy` instance with namespaced domain properties.
18
18
19
+
## Critical rule: geocode before any chart endpoint
20
+
21
+
Every chart, horoscope, panchang, dasha, dosha, navamsa, KP, synastry, compatibility, and natal endpoint needs `latitude`, `longitude`, and (for Western) `timezone`. **Never ask the user for coordinates.** Always call `roxy.location.search_cities` first.
22
+
23
+
```python
24
+
cities = roxy.location.search_cities(q="Mumbai")
25
+
lat, lng, tz = cities[0]["latitude"], cities[0]["longitude"], cities[0]["timezone"]
26
+
```
27
+
19
28
## Domains
20
29
21
-
Type `roxy.` to see all available namespaces:
30
+
Type `roxy.` to see all available namespaces. Type `roxy.{domain}.` in an IDE with a Python LSP to see every method.
|`longitude`| Decimal degrees (float) |`77.209` (Delhi), `-74.006` (NYC), `139.6917` (Tokyo) | Same as latitude - no DMS strings |
189
+
|`sign` (horoscope kwarg) | Lowercase zodiac name |`"aries"`, `"taurus"`, `"gemini"`, ... `"pisces"`|`"Aries"`, `"♈"`, `"1"`, `"ARIES"` (case-insensitive but prefer lowercase) |
190
+
|`full_name` (numerology) | Birth-certificate name |`"John William Smith"`, `"Priya Rajesh Sharma"`| Nickname, married name, partial name - affects all letter-based calcs |
191
+
|`seed`| Any string (deterministic) |`"user-42"`, `"session-abc-123"`, email hash | Numbers, objects - must be string |
|`person1` / `person2`| Dict with full birth data |`{"date": ..., "time": ..., "latitude": ..., "longitude": ..., "timezone": ...}` (Western) or same without timezone (Vedic) | Separate top-level kwargs, missing time, partial dict |
200
+
|`question` (tarot / iching) | Optional string |`"Should I accept the job offer?"`, `"What should I focus on this week?"`| Omit for general reading. More specific = better interpretation. |
| Los Angeles (PST / PDT) |`-8` / `-7`| Honolulu |`-10`|
218
+
219
+
DST matters. If the birth date falls inside a daylight-saving window, use the summer / DST offset. For Vedic endpoints this is rarely an issue (most users are in India, fixed 5.5), but Western natal charts must respect DST at the time of birth.
220
+
221
+
## MCP equivalents
222
+
223
+
Every method has a matching MCP tool. MCP server per domain is at `https://roxyapi.com/mcp/{domain}-api`. Tool names follow `{method}_{path_snake_case}`, for example:
224
+
225
+
-`POST /astrology/natal-chart` -> `post_astrology_natal_chart` on `/mcp/astrology-api`
226
+
-`GET /astrology/horoscope/{sign}/daily` -> `get_astrology_horoscope_sign_daily` on `/mcp/astrology-api`
227
+
-`POST /vedic-astrology/birth-chart` -> `post_vedic_astrology_birth_chart` on `/mcp/vedic-astrology-api`
228
+
-`POST /tarot/spreads/celtic-cross` -> `post_tarot_spreads_celtic_cross` on `/mcp/tarot-api`
229
+
230
+
Use the SDK for typed Python apps. Use MCP for AI agents (Claude Desktop, Cursor MCP, OpenAI agents) where the agent selects tools based on user intent.
134
231
135
232
## Gotchas
136
233
234
+
-**Geocode first.** Any chart, panchang, synastry, compatibility, or natal endpoint needs coordinates. Call `roxy.location.search_cities` before the chart method.
137
235
-**All parameters are keyword arguments.** Use `sign="aries"` not positional `"aries"`.
138
236
-**Async methods end with `_async`.** Every sync method has a matching async variant.
139
237
-**Do not expose API keys client-side.** Call Roxy from server code only.
140
-
-**Chart endpoints need coordinates.** Use `roxy.location.search_cities()` to get lat/lng.
141
238
-**Date format is `YYYY-MM-DD`, time is `HH:MM:SS`.** Both are strings.
239
+
-**Western `timezone` is required** (decimal hours, `-5` for EST, `5.5` for IST, `0` for UTC). Vedic endpoints accept an optional `timezone` that defaults to `5.5` (IST).
142
240
-**Errors raise `RoxyAPIError`.** Catch it and check `e.code`, `e.error`, and `e.status_code`.
143
-
-**Switch on `code`, not `error`.**The `code` field is stable. The `error` message may change.
241
+
-**Switch on `code`, not `error`.**Codes are stable. Messages may change.
0 commit comments