Metadata-Version: 2.4
Name: kundli-ai
Version: 0.1.1
Summary: Vedic astrology engine with predictions and insights
Author: Rudranarayan Sahu
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: pyswisseph
Requires-Dist: python-dateutil

# 🔮 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

```bash
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

```python
from kundli import set_ephemeris_path

set_ephemeris_path("path/to/ephe")
```

---

## 🚀 Quick Start

```python
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

```json
{
  "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:

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

#### Output:

```python
{
  "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:

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

Run locally:

```bash
python main.py
```

---

## 🧪 Testing

```bash
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.
