Python SDK for RoxyAPI. Astrology, tarot, numerology, and more.
Project description
roxy-sdk
Python SDK for RoxyAPI. Astrology, tarot, numerology, I Ching, crystals, angel numbers, dream interpretation, biorhythm, and more. One API key, 11 domains, 120+ endpoints.
Install
pip install roxy-sdk
Quickstart
from roxy_sdk import create_roxy
roxy = create_roxy("your-api-key")
horoscope = roxy.astrology.get_daily_horoscope(sign="aries")
print(horoscope)
Get your API key at roxyapi.com/pricing. Free test keys available on the interactive docs.
Recipes
Dating app: zodiac compatibility
person1 = {"date": "1990-01-15", "time": "14:30:00", "latitude": 28.61, "longitude": 77.20}
person2 = {"date": "1992-07-22", "time": "09:00:00", "latitude": 19.07, "longitude": 72.87}
score = roxy.astrology.calculate_compatibility(person1=person1, person2=person2)
print(f"Compatibility: {score}")
Wellness app: daily tarot card
card = roxy.tarot.get_daily_card()
print(f"Today: {card}")
Journaling app: dream interpretation
symbol = roxy.dreams.get_dream_symbol(id="flying")
print(f"Flying in dreams: {symbol}")
Numerology calculator: life path number
result = roxy.numerology.calculate_life_path(year=1990, month=1, day=15)
print(f"Life Path: {result}")
chart = roxy.numerology.generate_numerology_chart(full_name="Jane Smith", year=1990, month=1, day=15)
print(f"Full chart: {chart}")
Crystal healing: zodiac crystals
crystals = roxy.crystals.get_crystals_by_zodiac(sign="scorpio")
print(f"Scorpio crystals: {crystals}")
I Ching: daily reading
reading = roxy.iching.cast_daily_reading()
print(f"I Ching: {reading}")
Domain reference
| Domain | Property | What it covers |
|---|---|---|
| Western Astrology | roxy.astrology |
Natal charts, horoscopes, synastry, compatibility, transits, moon phases |
| Vedic Astrology | roxy.vedic_astrology |
Birth charts, dashas, nakshatras, panchang, KP system, doshas, yogas |
| Tarot | roxy.tarot |
Spreads, daily pulls, yes/no oracle, Celtic Cross, custom layouts |
| Numerology | roxy.numerology |
Life path, expression, soul urge, personal year, karmic analysis |
| I Ching | roxy.iching |
Hexagrams, trigrams, coin casting, daily readings |
| Crystals | roxy.crystals |
Healing properties, zodiac/chakra pairings, birthstones, search |
| Angel Numbers | roxy.angel_numbers |
Number meanings, pattern analysis, daily guidance |
| Dreams | roxy.dreams |
Symbol dictionary, interpretations, daily guidance |
| Biorhythm | roxy.biorhythm |
Physical, emotional, intellectual cycles, forecasts, compatibility |
| Location | roxy.location |
City geocoding for birth chart coordinates |
| Usage | roxy.usage |
API usage stats and subscription info |
Async support
Every method has an _async suffix variant for use with asyncio:
import asyncio
from roxy_sdk import create_roxy
async def main():
roxy = create_roxy("your-api-key")
horoscope = await roxy.astrology.get_daily_horoscope_async(sign="aries")
card = await roxy.tarot.get_daily_card_async()
print(horoscope, card)
asyncio.run(main())
Framework examples
The SDK is framework-agnostic. It works with Django, Flask, FastAPI, or any Python project.
FastAPI
from fastapi import FastAPI
from roxy_sdk import create_roxy
app = FastAPI()
roxy = create_roxy("your-api-key")
@app.get("/horoscope/{sign}")
async def horoscope(sign: str):
return await roxy.astrology.get_daily_horoscope_async(sign=sign)
Flask
from flask import Flask, jsonify
from roxy_sdk import create_roxy
app = Flask(__name__)
roxy = create_roxy("your-api-key")
@app.route("/horoscope/<sign>")
def horoscope(sign):
return jsonify(roxy.astrology.get_daily_horoscope(sign=sign))
Django (views.py)
from django.http import JsonResponse
from roxy_sdk import create_roxy
roxy = create_roxy("your-api-key")
def horoscope(request, sign):
return JsonResponse(roxy.astrology.get_daily_horoscope(sign=sign))
Error handling
All API errors raise RoxyAPIError with error (human-readable message), code (machine-readable, stable), and status_code attributes:
from roxy_sdk import create_roxy, RoxyAPIError
roxy = create_roxy("your-api-key")
try:
result = roxy.astrology.get_daily_horoscope(sign="invalid")
except RoxyAPIError as e:
print(f"Error: {e.error}")
print(f"Code: {e.code}")
print(f"Status: {e.status_code}")
Error codes:
| Status | Code | When |
|---|---|---|
| 400 | validation_error |
Missing or invalid parameters |
| 401 | api_key_required |
No API key provided |
| 401 | invalid_api_key |
Key format invalid or tampered |
| 429 | rate_limit_exceeded |
Monthly quota reached |
| 404 | not_found |
Resource not found |
| 500 | internal_error |
Server error |
Environment variable
Store your API key in an environment variable for production use:
import os
from roxy_sdk import create_roxy
roxy = create_roxy(os.environ["ROXY_API_KEY"])
Configuration
create_roxy accepts optional parameters for advanced usage:
roxy = create_roxy(
api_key="your-api-key",
base_url="https://roxyapi.com/api/v2", # default, override for local development
timeout=30.0, # request timeout in seconds (default: 30)
)
The client reuses HTTP connections for performance. For explicit cleanup, use the context manager:
with create_roxy("your-api-key") as roxy:
horoscope = roxy.astrology.get_daily_horoscope(sign="aries")
# connections closed automatically
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file roxy_sdk-0.1.1.tar.gz.
File metadata
- Download URL: roxy_sdk-0.1.1.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
131ceae74db5cbfb095ed2c3d8befeb8877d70205ebd163205e80bb3ddb9a574
|
|
| MD5 |
8555803d6e8e5469e15136044200bbd0
|
|
| BLAKE2b-256 |
546a7cddbc2e1a65d693f0e17435714334d39e0d6633f115329a0ce084ccb888
|
Provenance
The following attestation bundles were made for roxy_sdk-0.1.1.tar.gz:
Publisher:
release.yml on RoxyAPI/sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
roxy_sdk-0.1.1.tar.gz -
Subject digest:
131ceae74db5cbfb095ed2c3d8befeb8877d70205ebd163205e80bb3ddb9a574 - Sigstore transparency entry: 1357074545
- Sigstore integration time:
-
Permalink:
RoxyAPI/sdk-python@13404e1be42f566fac960bb66df5aada4fbee9a8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/RoxyAPI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@13404e1be42f566fac960bb66df5aada4fbee9a8 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file roxy_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: roxy_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eee2f015d8fb9c64d934e0cab57d3c61006258f8512627b2c5d487cac47fd951
|
|
| MD5 |
e84e2bea257b6c300235f2f473b1f08e
|
|
| BLAKE2b-256 |
4bc267ff6541829969214a4ec46721422a7b7dcfa31bd9246e4712efc3d674a9
|
Provenance
The following attestation bundles were made for roxy_sdk-0.1.1-py3-none-any.whl:
Publisher:
release.yml on RoxyAPI/sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
roxy_sdk-0.1.1-py3-none-any.whl -
Subject digest:
eee2f015d8fb9c64d934e0cab57d3c61006258f8512627b2c5d487cac47fd951 - Sigstore transparency entry: 1357074548
- Sigstore integration time:
-
Permalink:
RoxyAPI/sdk-python@13404e1be42f566fac960bb66df5aada4fbee9a8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/RoxyAPI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@13404e1be42f566fac960bb66df5aada4fbee9a8 -
Trigger Event:
workflow_dispatch
-
Statement type: