asterwise-python
The official Python library for Asterwise — Vedic + Western astrology, numerology, tarot, crystals, and dreams. 118 endpoints, generated from the API's OpenAPI document so the types match what the server sends. Every position is checked against NASA JPL Horizons, median 0.046 arcseconds over 80 positions from 1950 to 2050. Compared row by row with seven other astrology APIs, every claim sourced, at asterwise.com/compare.
Documentation · API Reference · Pricing · MCP server · Postman collection
Installation
pip install asterwise
Quickstart
import asterwise
from asterwise.api.astrology_api import AstrologyApi
configuration = asterwise.Configuration(
host="https://api.asterwise.com",
access_token="YOUR_API_KEY",
)
with asterwise.ApiClient(configuration) as client:
api = AstrologyApi(client)
result = api.natal_chart(
asterwise.NatalRequest(
date="1985-11-12",
time="06:45",
location="Mumbai, India",
ayanamsa="lahiri",
)
)
print(result)
Get a free API key at asterwise.com.
What you can build
| Domain | Operations |
|---|---|
| Vedic astrology | 40 |
| Matchmaking | 5 |
| Western astrology | 17 |
| Horoscope | 8 |
| Numerology | 24 |
| KP + Lal Kitab | 5 |
| Tarot | 9 |
| Crystals & dreams | 7 |
| Utilities | 2 |
118 typed SDK methods across 13 API classes covering 118 REST endpoints.
What makes Asterwise different
- Classical interpretation text alongside the calculations on chart endpoints (natal chart, dasha, yogas, doshas)
- 5-level Vimshottari Dasha (Maha → Antar → Pratyantar → Sookshma → Prana) — most APIs return two
- Rajju and Vedha as hard vetoes in matchmaking — not just point scores
- HMAC-signed responses for auditability
- Panchanga as printed panchangs show it: every tithi, nakshatra, yoga and karana of the day with start and end times, the festival and vrat calendar, and muhurta search with exact ISO times
- Typed responses: every method returns a model generated from the OpenAPI document (
.to_dict()gives a plain dict) - MCP server with 104 tools for Claude and Cursor integration
Examples
from datetime import date
from asterwise.api.western_astrology_api import WesternAstrologyApi
from asterwise.api.numerology_api import NumerologyApi
from asterwise.api.tarot_api import TarotApi
with asterwise.ApiClient(configuration) as client:
western = WesternAstrologyApi(client)
chart = western.western_natal_chart(
asterwise.WesternNatalRequest(
date="1985-11-12",
time="06:45",
location="Mumbai, India",
)
)
numerology = NumerologyApi(client)
path = numerology.life_path(var_date=date(1985, 11, 12))
tarot = TarotApi(client)
spread = tarot.tarot_three_card(
asterwise.SpreadRequest(question="What should I focus on this month?")
)
Requirements
Python 3.9+. An API key from asterwise.com.
Documentation
Full API reference: docs.asterwise.com
Development
Regenerate from https://api.asterwise.com/openapi-sdk.json (see asterwise-api/_docs/SDK_CONTRACT.md).
Requirements: Node.js/npm (for npx), Java 11+ for OpenAPI Generator.
bash scripts/generate.sh
Releasing: bump version in pyproject.toml (the only place it is set) → bash scripts/generate.sh (writes that version into __version__ and the User-Agent) → update CHANGELOG.md → pytest → commit → push a python-v<version> tag. The publish workflow checks the tag against pyproject.toml, runs the tests, builds, runs twine check and uploads to PyPI.
Support
License
Commercial. See LICENSE.
Metadata
Release files for asterwise 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| asterwise-0.5.0.tar.gz | 305.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asterwise-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / asterwise-0.5.0.tar.gz
| Download URL | asterwise-0.5.0.tar.gz |
|---|---|
| Size | 305.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99c2a17767fb7e121e7ddc8b9ee370dd085bd49b789f6a882f6f1cefe4ab9939
|
|
BLAKE2b-256 checksum How to use checksums |
b74a219c0db008534c671524f58f7241cd82d5df4c0be8c216b6986afcc98cae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / asterwise-0.5.0-py3-none-any.whl
| Download URL | asterwise-0.5.0-py3-none-any.whl |
|---|---|
| Size | 818.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a9e5ec56e53380f925114c9ac658ec2e5c43ed110a6b42fb4a1f129dee430d8
|
|
BLAKE2b-256 checksum How to use checksums |
39adff3ae503cefef0878677f4d7fa6213dd1de4560539d45326db96e2b12a7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|