Skip to main content

Asterwise API

Project description

asterwise

Official Python SDK for the Asterwise Vedic Astrology API.

pip install asterwise

Authentication

Get a free API key at asterwise.com. Pass it when configuring the client:

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)

Requirements

Python 3.9+

What's included in this SDK (v0.1.4)

The Python SDK currently exposes 59 of 117 asterwise platform endpoints organized into four categories:

Astrology — Natal chart, Dasha (5 levels), Yogas, Doshas, Divisional charts (D1–D60), Ashtakavarga, Shadbala, Gochar, Sade Sati, Dasha-Transit correlation, Matchmaking (Ashtakoota, Dashakoot, Porutham, Thirumana Porutham, Papasamyam), Panchanga, Choghadiya, Hora, Rahu Kaal, Muhurta, Varshaphal, Prashna, Remedies, Gemstones, KP System, Lal Kitab, Atmakaraka, Ishta Devata, Nakshatra — 38 endpoints

Numerology — Profile, Compatibility, Life Path, Personal Year, Lucky Numbers, Number Meaning, Name Correction, Business Name, Chaldean, Lo Shu, Mobile Number, Vehicle Number — 14 endpoints

Horoscope — Daily, Weekly, Monthly, Yearly × 12 Moon signs — 4 endpoints

Utilities — Geocode (city → coordinates), Timezone lookup — 2 endpoints

Platform scope: The asterwise platform exposes 117 REST endpoints in total (covering Vedic astrology, Western astrology, numerology, horoscope, tarot, crystals, and dreams). The SDK regenerates from the OpenAPI specification to align with platform scope. For the complete API reference see docs.asterwise.com. Coverage gap will close in the next SDK regeneration.

Documentation

Full API reference: docs.asterwise.com

Development

Regenerating the SDK

The SDK is generated from the asterwise SDK OpenAPI spec at https://api.asterwise.com/openapi-sdk.json. The contract that governs which operations are exposed and what their method names are lives in asterwise-api/_docs/SDK_CONTRACT.md.

Requirements:

  • Node.js and npm (the script uses npx)
  • Java 11+ — the underlying openapi-generator JAR requires it
    • macOS: brew install openjdk@17
    • Ubuntu: sudo apt install openjdk-17-jre-headless

The script preflight-checks for Java and prints install instructions if missing.

To regenerate locally:

bash scripts/generate.sh

To preview changes without applying them:

bash scripts/generate.sh --check

The script invokes openapi-generator-cli at the version pinned in openapitools.json. Regeneration is deterministic from the input spec; running it twice produces identical output.

To publish a new version after regeneration:

  1. Bump version in pyproject.toml AND __version__ in asterwise/__init__.py (semver — breaking changes require major bump after 1.0.0).
  2. Update CHANGELOG.md with the changes.
  3. Build: python -m build
  4. Smoke test the wheel: pip install dist/asterwise-X.Y.Z-py3-none-any.whl in a scratch venv.
  5. Publish: twine upload dist/* (requires PyPI credentials).

See asterwise-api/_docs/audits/REFINE_PLAN_2026_05.md for the regeneration roadmap.

Support

support@asterwise.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asterwise-0.2.0.tar.gz (201.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asterwise-0.2.0-py3-none-any.whl (515.7 kB view details)

Uploaded Python 3

File details

Details for the file asterwise-0.2.0.tar.gz.

File metadata

  • Download URL: asterwise-0.2.0.tar.gz
  • Upload date:
  • Size: 201.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for asterwise-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b2c4254a5c5eda0611c10f04bd1528f9eca4c9ccf57866ceb25be35f519ab898
MD5 0b4894a3478d1ec8dd544a01ddc23032
BLAKE2b-256 8aea2736d146d222866867aefe5df3a78ba01a0fdcaea3eafba5e9aea22179d8

See more details on using hashes here.

File details

Details for the file asterwise-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: asterwise-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 515.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for asterwise-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68e117c75b58fcf2575455d3fe999e290cdd63f1a6f88975eaae872eb4c5f247
MD5 a7e7949b16c3cb4872d0fd9839e2c7b4
BLAKE2b-256 0d2947951bf58106df38e6cc7ca83b076010e253b02622bd4402d6191fd0fa58

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page