Skip to main content

Vedic astrology engine with predictions and insights

Project description

🔮 Kundli AI — Vedic Astrology Engine

A powerful, production-ready Vedic astrology engine built in Python. Generate accurate Kundli charts, planetary positions, dashas, yogas, and human-like interpretations — all without external APIs.


✨ Features

  • 🪐 Accurate planetary calculations using Swiss Ephemeris
  • 🏠 Whole sign house system
  • 🔁 Vimshottari Dasha system (Mahadasha + Antardasha)
  • 🧘 Yoga detection (Raj Yoga, Vipreet Raj Yoga, Exalted planets, etc.)
  • 🧠 Intelligent interpretation engine
  • 📜 Human-like narrative reports
  • ⚡ Fast, offline, no API dependency

📦 Installation

pip install kundli-ai

⚙️ Setup (Important)

This library requires Swiss Ephemeris data files.

Step 1: Download ephemeris files

Download from: https://www.astro.com/ftp/swisseph/ephe/

Step 2: Set ephemeris path

from kundli import set_ephemeris_path

set_ephemeris_path("path/to/ephe")

🚀 Quick Start

from kundli import generate_kundli, set_ephemeris_path

set_ephemeris_path("./ephe")

data = {
    "datetime": "1995-08-15T10:30:00",
    "lat": 19.0760,
    "lon": 72.8777
}

result = generate_kundli(data)

print(result["ascendant"])
print(result["planets"])
print(result["interpretation"]["summary"])
print(result["report"]["text"])

📊 Sample Output

{
  "ascendant": {
    "longitude": 250.054,
    "rashi": "Sagittarius"
  },
  "interpretation": {
    "summary": "You are running Mercury Mahadasha and Jupiter Antardasha.",
    "yogas": ["Vipreet Raj Yoga", "Mars Exalted"],
    "insights": [
      "Mars in house 9 influences luck, dharma, and higher learning..."
    ]
  }
}

🧠 What You Get

🔹 Kundli Data

  • Ascendant (Lagna)
  • 12 Houses
  • Planetary Positions (Rashi + Nakshatra)

🔹 Dasha System

  • Current Mahadasha
  • Current Antardasha
  • Full Dasha Timeline

🔹 Interpretations

  • Planet + House insights
  • Strength analysis (Exalted / Debilitated)
  • Yogas detection
  • Aspects between planets

🔹 AI-like Narrative Report

  • Human-readable astrology explanation
  • Structured sections for clarity

🧩 API Reference

generate_kundli(data: dict)

Input:

{
  "datetime": "YYYY-MM-DDTHH:MM:SS",
  "lat": float,
  "lon": float
}

Output:

{
  "ascendant": {...},
  "houses": [...],
  "planets": {...},
  "planet_house_mapping": {...},
  "dasha": {...},
  "interpretation": {...},
  "report": {...}
}

⚠️ Important Notes

  • Ephemeris files are required for accurate calculations
  • Results depend on correct date, time, and location
  • This library uses sidereal astrology (Lahiri ayanamsa)

🛠 Development

Clone the repo:

git clone https://github.com/rudranarayan-spec/kundli-python-npm
cd kundli-python-npm
pip install -e .

Run locally:

python main.py

🧪 Testing

python -m build
pip install dist/*.whl

🚀 Roadmap

  • 🔮 Prediction engine (career, marriage timing)
  • 📅 Transit analysis (Gochar)
  • 🌐 API service (SaaS version)
  • 📦 NPM package (JavaScript support)
  • 🤖 Optional AI-powered narratives

🤝 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.


📄 License

MIT License


⭐ Support

If you find this project useful, consider giving it a star ⭐ It helps others discover the project.


👨‍💻 Author

Built with precision and passion for astrology + engineering.

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

kundli_ai-0.1.1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

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

kundli_ai-0.1.1-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file kundli_ai-0.1.1.tar.gz.

File metadata

  • Download URL: kundli_ai-0.1.1.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for kundli_ai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f9b849031f41dcf2d7706a0ccf138b8f2a4477778384c361ccdeddb6ad902953
MD5 ff0916903e968ca42e4060717e9e7c37
BLAKE2b-256 2c3c67981a43aefc571fee46754fb98e34e035865c5ee7f4ba1db29b84c12f68

See more details on using hashes here.

File details

Details for the file kundli_ai-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: kundli_ai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for kundli_ai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f34e8b435c3982ca3d2400e967b7d9bd65b663276ddaff43db03648a6dd84ef2
MD5 b4daac1bd1d16599d91a7df1cb6ab072
BLAKE2b-256 f83579abfed6abc380c8133065b3af7d67a610df0a5e2b53bc11a0ffd75eb915

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