Skip to main content

Asterwise

asterwise-python

PyPI version Python versions

The official Python library for Asterwise — Vedic + Western astrology, numerology, tarot, crystals, and dreams. 129 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.050 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 Endpoints
Vedic astrology 44
Matchmaking 5
Western astrology 26
Horoscope 8
Numerology 23
KP + Lal Kitab 5
Tarot 9
Crystals & dreams 7
Utilities 2

143 typed SDK methods across 15 API classes covering 129 REST endpoints (5 endpoints keep a deprecated GET method next to the POST one; 9 endpoints also answer on GET with the same fields as query parameters).

Plus UsageApi.get_my_usage for your account's usage (Check your usage); it reads your account, so it is not counted as an endpoint.

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 118 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_post(asterwise.LifePathRequest(date=date(1985, 11, 12)))

    tarot = TarotApi(client)
    spread = tarot.tarot_three_card(
        asterwise.SpreadRequest(question="What should I focus on this month?")
    )

Check your usage

from asterwise import UsageApi

with asterwise.ApiClient(configuration) as client:
    usage = UsageApi(client).get_my_usage().data
    print(usage.calls_used, usage.calls_limit, usage.burst_limit, usage.reset_date)

This call is not billed and does not use your plan's limits.

Requirements

Python 3.10+. 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

support@asterwise.com

License

MIT. See LICENSE.

Metadata

Release files for asterwise 0.13.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asterwise 0.13.2
File Size Uploaded Provenance Actions
asterwise-0.13.2.tar.gz 402.4 kB With provenance Details for asterwise-0.13.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for asterwise 0.13.2
File Interpreter ABI Platform Actions
asterwise-0.13.2-py3-none-any.whl Python 3 none any Details for asterwise-0.13.2-py3-none-any.whl

Total release size: 1.4 MB

Release files / asterwise-0.13.2.tar.gz

Download URL asterwise-0.13.2.tar.gz
Size 402.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9e1746947ebfc90526d834ea404d9a58b15fc5addb668eb5782af6cb8c1cdab1
BLAKE2b-256 checksum
How to use checksums
96db70eb58c4b8b7ac82754f8f5870cd4951c5b3afc255188290471c3f66f806
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / asterwise-0.13.2-py3-none-any.whl

Download URL asterwise-0.13.2-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
375774284ba356669b24ac4b0f434a1854b7274681fd1f454da0af83a35a403b
BLAKE2b-256 checksum
How to use checksums
fa5be8be110f460627ffca158c69661aeeba91bc1ac8189f6d8500863d8d184d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for asterwise 0.13.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for asterwise-0.13.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page