dashaflow 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dashaflow-1.0.0/.github/workflows/publish.yml +32 -0
- dashaflow-1.0.0/.gitignore +21 -0
- dashaflow-1.0.0/LICENSE +21 -0
- dashaflow-1.0.0/PKG-INFO +173 -0
- dashaflow-1.0.0/README.md +147 -0
- dashaflow-1.0.0/pyproject.toml +42 -0
- dashaflow-1.0.0/src/dashaflow/__init__.py +241 -0
- dashaflow-1.0.0/src/dashaflow/_validation.py +21 -0
- dashaflow-1.0.0/src/dashaflow/_version.py +1 -0
- dashaflow-1.0.0/src/dashaflow/ashtakavarga.py +128 -0
- dashaflow-1.0.0/src/dashaflow/career.py +171 -0
- dashaflow-1.0.0/src/dashaflow/constants.py +223 -0
- dashaflow-1.0.0/src/dashaflow/dasha.py +185 -0
- dashaflow-1.0.0/src/dashaflow/dignity.py +148 -0
- dashaflow-1.0.0/src/dashaflow/jaimini.py +243 -0
- dashaflow-1.0.0/src/dashaflow/matchmaking.py +508 -0
- dashaflow-1.0.0/src/dashaflow/muhurtha.py +236 -0
- dashaflow-1.0.0/src/dashaflow/nakshatra.py +24 -0
- dashaflow-1.0.0/src/dashaflow/panchang.py +97 -0
- dashaflow-1.0.0/src/dashaflow/shadbala.py +435 -0
- dashaflow-1.0.0/src/dashaflow/vedic_calculator.py +694 -0
- dashaflow-1.0.0/src/dashaflow/yoga.py +559 -0
- dashaflow-1.0.0/test_comprehensive.py +1294 -0
- dashaflow-1.0.0/test_enhancements.py +43 -0
- dashaflow-1.0.0/test_phase2.py +71 -0
- dashaflow-1.0.0/tests/test_comprehensive.py +1320 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
- uses: actions/setup-python@v5
|
|
13
|
+
with:
|
|
14
|
+
python-version: "3.12"
|
|
15
|
+
- run: pip install -e ".[test]" || pip install -e .
|
|
16
|
+
- run: pip install pytest
|
|
17
|
+
- run: pytest tests/ -q
|
|
18
|
+
|
|
19
|
+
publish:
|
|
20
|
+
needs: test
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
environment: pypi
|
|
23
|
+
permissions:
|
|
24
|
+
id-token: write
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
- uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.12"
|
|
30
|
+
- run: pip install build
|
|
31
|
+
- run: python -m build
|
|
32
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
dashaflow-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Adarsh J
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
dashaflow-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dashaflow
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Vedic astrology calculation engine — Swiss Ephemeris with Sidereal Lahiri ayanamsha
|
|
5
|
+
Project-URL: Homepage, https://github.com/adarshj322/dashaflow
|
|
6
|
+
Project-URL: Repository, https://github.com/adarshj322/dashaflow
|
|
7
|
+
Project-URL: Issues, https://github.com/adarshj322/dashaflow/issues
|
|
8
|
+
Author: Adarsh J
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: astrology,dashaflow,horoscope,jyotish,navamsha,vedic,vimshottari
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Religion
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Requires-Dist: pyswisseph>=2.10.3
|
|
24
|
+
Requires-Dist: pytz>=2024.1
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# DashaFlow
|
|
28
|
+
|
|
29
|
+
A Vedic astrology calculation engine for Python, built on the **Swiss Ephemeris** with **Sidereal Lahiri** ayanamsha. Rooted in *Brihat Parashara Hora Shastra* (BPHS) and B.V. Raman's *Hindu Predictive Astrology*.
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install dashaflow
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
import dashaflow
|
|
39
|
+
|
|
40
|
+
# Cast a natal chart
|
|
41
|
+
chart = dashaflow.cast_chart("1990-04-15", "14:30", 28.6139, 77.2090, "Asia/Kolkata")
|
|
42
|
+
|
|
43
|
+
print(chart["lagna"]["sign"]) # "Leo"
|
|
44
|
+
print(chart["planets"]["Moon"]["nakshatra"]) # "Ashwini"
|
|
45
|
+
print(chart["planets"]["Jupiter"]["dignity"]) # "exalted"
|
|
46
|
+
print(chart["dashas"]["maha"]["planet"]) # Current Mahadasha lord
|
|
47
|
+
print(chart["yogas"]) # Detected yogas
|
|
48
|
+
|
|
49
|
+
# Transits
|
|
50
|
+
transit = dashaflow.cast_transit("2026-03-29", chart)
|
|
51
|
+
print(transit["sade_sati"])
|
|
52
|
+
|
|
53
|
+
# Compatibility (Person 1 = Male, Person 2 = Female)
|
|
54
|
+
compat = dashaflow.calculate_compatibility(
|
|
55
|
+
"1990-04-15", "14:30", 28.61, 77.21, "Asia/Kolkata",
|
|
56
|
+
"1992-08-20", "09:15", 19.07, 72.87, "Asia/Kolkata",
|
|
57
|
+
)
|
|
58
|
+
print(f"Score: {compat['total']}/36")
|
|
59
|
+
|
|
60
|
+
# Muhurtha (electional astrology)
|
|
61
|
+
muhurtha = dashaflow.check_muhurtha("marriage", "2026-11-15", "10:30", 28.61, 77.21, "Asia/Kolkata")
|
|
62
|
+
print(muhurtha["verdict"]) # "auspicious" / "mixed" / "inauspicious"
|
|
63
|
+
|
|
64
|
+
# Career analysis
|
|
65
|
+
career = dashaflow.analyze_career("1990-04-15", "14:30", 28.61, 77.21, "Asia/Kolkata")
|
|
66
|
+
print(career["career_themes"])
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## API
|
|
70
|
+
|
|
71
|
+
### Top-Level Functions
|
|
72
|
+
|
|
73
|
+
| Function | Description |
|
|
74
|
+
|---|---|
|
|
75
|
+
| `cast_chart(dob, time, lat, lon, timezone, query_date=None, ephe_path='')` | Complete natal chart — planets, dashas, yogas, ashtakavarga, shadbala, vargas, and more |
|
|
76
|
+
| `cast_transit(transit_date, natal_chart, timezone="Asia/Kolkata")` | Planetary transits overlaid on natal chart with SAV points, Sade Sati, Rahu-Ketu axis |
|
|
77
|
+
| `calculate_compatibility(dob1, time1, lat1, lon1, tz1, dob2, time2, lat2, lon2, tz2)` | 36-point Ashtakoot + extended kutas + Kuja Dosha |
|
|
78
|
+
| `check_muhurtha(activity, date, time, lat, lon, timezone)` | Electional astrology for 6 activity types |
|
|
79
|
+
| `analyze_career(dob, time, lat, lon, timezone)` | D10 Dashamsha career analysis with theme recommendations |
|
|
80
|
+
|
|
81
|
+
### Sub-Module Access
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
from dashaflow.dasha import calculate_dashas
|
|
85
|
+
from dashaflow.matchmaking import calculate_ashtakoot
|
|
86
|
+
from dashaflow.shadbala import calculate_shadbala
|
|
87
|
+
from dashaflow.jaimini import calculate_jaimini_karakas, calculate_arudha_padas
|
|
88
|
+
from dashaflow.yoga import detect_yogas, detect_kaal_sarpa
|
|
89
|
+
from dashaflow.ashtakavarga import calculate_ashtakavarga
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### `cast_chart()` Returns
|
|
93
|
+
|
|
94
|
+
| Key | Description |
|
|
95
|
+
|---|---|
|
|
96
|
+
| `metadata` | DOB, time, coordinates, ayanamsha (Lahiri), query date |
|
|
97
|
+
| `panchang` | Tithi, Vara, Nakshatra, Yoga, Karana |
|
|
98
|
+
| `lagna` | Ascendant sign, degree, nakshatra, pada, D2–D60 signs |
|
|
99
|
+
| `planets` | Per planet: sign, degree, house, nakshatra, pada, dignity, combustion, retrograde, digbala, aspects, 14 varga signs |
|
|
100
|
+
| `dashas` | 5 levels: Maha, Antar, Pratyantar, Sukshma, Prana + 120-year timeline |
|
|
101
|
+
| `yogas` | 24 types detected with forming planets and descriptions |
|
|
102
|
+
| `ashtakavarga` | SAV, BAV, Prashtara (source-level bindus) |
|
|
103
|
+
| `jaimini_karakas` | 7 Karakas by degree (Atmakaraka through Darakaraka) |
|
|
104
|
+
| `shadbala` | Six-fold strength in Rupas + percentage + Ishta/Kashta Phala |
|
|
105
|
+
| `bhava_chalit` | Equal-house Bhava Chalit with planet placements per bhava |
|
|
106
|
+
| `avasthas` | Planetary age-states: Bala, Kumara, Yuva, Vriddha, Mrita |
|
|
107
|
+
| `kaal_sarpa` | Kaal Sarpa Dosha detection (full/partial, ascending/descending) |
|
|
108
|
+
| `graha_yuddha` | Planetary war — pairs within 1° with winner/loser |
|
|
109
|
+
| `gandanta` | Planets at water-fire sign boundaries (karmic knots) |
|
|
110
|
+
| `arudha_padas` | All 12 Arudha Padas (A1–A12) with BPHS exception rule |
|
|
111
|
+
| `upapada` | Upapada Lagna (A12) with lord and 2nd from UL |
|
|
112
|
+
| `karakamsha` | AK in Navamsha, Ishta Devata, planets in Karakamsha |
|
|
113
|
+
|
|
114
|
+
## Features
|
|
115
|
+
|
|
116
|
+
- **Natal Chart** — Lagna, 9 grahas, whole-sign houses, nakshatras with padas, dignities
|
|
117
|
+
- **14 Divisional Charts** — D2, D3, D4, D7, D9, D10, D12, D16, D20, D24, D27, D30, D40, D60
|
|
118
|
+
- **Planetary Strength** — Dignity (B.V. Raman), combustion (BPHS orbs), Digbala, Shadbala (6-fold), Ishta/Kashta Phala
|
|
119
|
+
- **BPHS Aspects** — 7th for all, special aspects for Mars (4th/8th), Jupiter (5th/9th), Saturn (3rd/10th)
|
|
120
|
+
- **Vimshottari Dasha** — 5 levels (Maha → Antar → Pratyantar → Sukshma → Prana), 120-year timeline
|
|
121
|
+
- **24 Yoga Types** — Pancha Mahapurusha, Gajakesari, Budhaditya, Raj Yoga, Neecha Bhanga, Parivartana, Dhana, and more
|
|
122
|
+
- **Ashtakavarga** — SAV, BAV, Prashtara (source-level bindu contributions)
|
|
123
|
+
- **Jaimini** — 7 Karakas, Arudha Padas (A1–A12), Upapada Lagna, Karakamsha
|
|
124
|
+
- **Compatibility** — 8 Ashtakoot kutas (36 pts) + Mahendra, Stree Deergha, Vedha, Rajju, Kuja Dosha
|
|
125
|
+
- **Muhurtha** — 6 activity types with Panchang Suddhi and marriage doshas
|
|
126
|
+
- **Career** — D10 analysis with planet-career significations and domain recommendations
|
|
127
|
+
- **Bhava Chalit** — Equal-house chart from Lagna midpoint
|
|
128
|
+
- **Avasthas** — 5 planetary age-states per BPHS
|
|
129
|
+
- **Kaal Sarpa, Graha Yuddha, Gandanta** — Dosha and junction detection
|
|
130
|
+
|
|
131
|
+
## Architecture
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
dashaflow/
|
|
135
|
+
├── __init__.py Public API (5 functions)
|
|
136
|
+
├── vedic_calculator.py Core engine — Swiss Ephemeris computations
|
|
137
|
+
├── constants.py Zodiac, nakshatras, dignity tables
|
|
138
|
+
├── nakshatra.py Nakshatra lookup from longitude
|
|
139
|
+
├── panchang.py Tithi, Vara, Yoga, Karana
|
|
140
|
+
├── yoga.py 24 yoga types + Kaal Sarpa, Graha Yuddha, Gandanta
|
|
141
|
+
├── dasha.py Vimshottari Dasha (5 levels)
|
|
142
|
+
├── dignity.py Dignity, combustion, digbala
|
|
143
|
+
├── ashtakavarga.py SAV, BAV, Prashtara
|
|
144
|
+
├── jaimini.py Karakas, Arudha Padas, Upapada, Karakamsha
|
|
145
|
+
├── shadbala.py Six-fold strength + Ishta/Kashta Phala
|
|
146
|
+
├── matchmaking.py 16-factor compatibility + Kuja Dosha
|
|
147
|
+
├── muhurtha.py Electional astrology
|
|
148
|
+
└── career.py D10 career analysis
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Ayanamsha
|
|
152
|
+
|
|
153
|
+
All calculations use **Lahiri (Chitrapaksha)** — the official standard of the Indian government and the most widely used system in Vedic astrology.
|
|
154
|
+
|
|
155
|
+
## Extended Ephemeris
|
|
156
|
+
|
|
157
|
+
The bundled Swiss Ephemeris files cover ~1800–2400 AD. For historical or far-future charts, download additional `.se1` files from [astro.com](https://www.astro.com/swisseph/) and pass the path:
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
chart = dashaflow.cast_chart("1200-03-10", "12:00", 28.61, 77.21, "Asia/Kolkata",
|
|
161
|
+
ephe_path="/path/to/extended/ephemeris")
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## References
|
|
165
|
+
|
|
166
|
+
- *Brihat Parashara Hora Shastra* — foundational text for Vedic astrology
|
|
167
|
+
- *Hindu Predictive Astrology* — B.V. Raman
|
|
168
|
+
- [Swiss Ephemeris](https://www.astro.com/swisseph/) — high-precision astronomical computation
|
|
169
|
+
|
|
170
|
+
## License
|
|
171
|
+
|
|
172
|
+
MIT
|
|
173
|
+
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# DashaFlow
|
|
2
|
+
|
|
3
|
+
A Vedic astrology calculation engine for Python, built on the **Swiss Ephemeris** with **Sidereal Lahiri** ayanamsha. Rooted in *Brihat Parashara Hora Shastra* (BPHS) and B.V. Raman's *Hindu Predictive Astrology*.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install dashaflow
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
import dashaflow
|
|
13
|
+
|
|
14
|
+
# Cast a natal chart
|
|
15
|
+
chart = dashaflow.cast_chart("1990-04-15", "14:30", 28.6139, 77.2090, "Asia/Kolkata")
|
|
16
|
+
|
|
17
|
+
print(chart["lagna"]["sign"]) # "Leo"
|
|
18
|
+
print(chart["planets"]["Moon"]["nakshatra"]) # "Ashwini"
|
|
19
|
+
print(chart["planets"]["Jupiter"]["dignity"]) # "exalted"
|
|
20
|
+
print(chart["dashas"]["maha"]["planet"]) # Current Mahadasha lord
|
|
21
|
+
print(chart["yogas"]) # Detected yogas
|
|
22
|
+
|
|
23
|
+
# Transits
|
|
24
|
+
transit = dashaflow.cast_transit("2026-03-29", chart)
|
|
25
|
+
print(transit["sade_sati"])
|
|
26
|
+
|
|
27
|
+
# Compatibility (Person 1 = Male, Person 2 = Female)
|
|
28
|
+
compat = dashaflow.calculate_compatibility(
|
|
29
|
+
"1990-04-15", "14:30", 28.61, 77.21, "Asia/Kolkata",
|
|
30
|
+
"1992-08-20", "09:15", 19.07, 72.87, "Asia/Kolkata",
|
|
31
|
+
)
|
|
32
|
+
print(f"Score: {compat['total']}/36")
|
|
33
|
+
|
|
34
|
+
# Muhurtha (electional astrology)
|
|
35
|
+
muhurtha = dashaflow.check_muhurtha("marriage", "2026-11-15", "10:30", 28.61, 77.21, "Asia/Kolkata")
|
|
36
|
+
print(muhurtha["verdict"]) # "auspicious" / "mixed" / "inauspicious"
|
|
37
|
+
|
|
38
|
+
# Career analysis
|
|
39
|
+
career = dashaflow.analyze_career("1990-04-15", "14:30", 28.61, 77.21, "Asia/Kolkata")
|
|
40
|
+
print(career["career_themes"])
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## API
|
|
44
|
+
|
|
45
|
+
### Top-Level Functions
|
|
46
|
+
|
|
47
|
+
| Function | Description |
|
|
48
|
+
|---|---|
|
|
49
|
+
| `cast_chart(dob, time, lat, lon, timezone, query_date=None, ephe_path='')` | Complete natal chart — planets, dashas, yogas, ashtakavarga, shadbala, vargas, and more |
|
|
50
|
+
| `cast_transit(transit_date, natal_chart, timezone="Asia/Kolkata")` | Planetary transits overlaid on natal chart with SAV points, Sade Sati, Rahu-Ketu axis |
|
|
51
|
+
| `calculate_compatibility(dob1, time1, lat1, lon1, tz1, dob2, time2, lat2, lon2, tz2)` | 36-point Ashtakoot + extended kutas + Kuja Dosha |
|
|
52
|
+
| `check_muhurtha(activity, date, time, lat, lon, timezone)` | Electional astrology for 6 activity types |
|
|
53
|
+
| `analyze_career(dob, time, lat, lon, timezone)` | D10 Dashamsha career analysis with theme recommendations |
|
|
54
|
+
|
|
55
|
+
### Sub-Module Access
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
from dashaflow.dasha import calculate_dashas
|
|
59
|
+
from dashaflow.matchmaking import calculate_ashtakoot
|
|
60
|
+
from dashaflow.shadbala import calculate_shadbala
|
|
61
|
+
from dashaflow.jaimini import calculate_jaimini_karakas, calculate_arudha_padas
|
|
62
|
+
from dashaflow.yoga import detect_yogas, detect_kaal_sarpa
|
|
63
|
+
from dashaflow.ashtakavarga import calculate_ashtakavarga
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### `cast_chart()` Returns
|
|
67
|
+
|
|
68
|
+
| Key | Description |
|
|
69
|
+
|---|---|
|
|
70
|
+
| `metadata` | DOB, time, coordinates, ayanamsha (Lahiri), query date |
|
|
71
|
+
| `panchang` | Tithi, Vara, Nakshatra, Yoga, Karana |
|
|
72
|
+
| `lagna` | Ascendant sign, degree, nakshatra, pada, D2–D60 signs |
|
|
73
|
+
| `planets` | Per planet: sign, degree, house, nakshatra, pada, dignity, combustion, retrograde, digbala, aspects, 14 varga signs |
|
|
74
|
+
| `dashas` | 5 levels: Maha, Antar, Pratyantar, Sukshma, Prana + 120-year timeline |
|
|
75
|
+
| `yogas` | 24 types detected with forming planets and descriptions |
|
|
76
|
+
| `ashtakavarga` | SAV, BAV, Prashtara (source-level bindus) |
|
|
77
|
+
| `jaimini_karakas` | 7 Karakas by degree (Atmakaraka through Darakaraka) |
|
|
78
|
+
| `shadbala` | Six-fold strength in Rupas + percentage + Ishta/Kashta Phala |
|
|
79
|
+
| `bhava_chalit` | Equal-house Bhava Chalit with planet placements per bhava |
|
|
80
|
+
| `avasthas` | Planetary age-states: Bala, Kumara, Yuva, Vriddha, Mrita |
|
|
81
|
+
| `kaal_sarpa` | Kaal Sarpa Dosha detection (full/partial, ascending/descending) |
|
|
82
|
+
| `graha_yuddha` | Planetary war — pairs within 1° with winner/loser |
|
|
83
|
+
| `gandanta` | Planets at water-fire sign boundaries (karmic knots) |
|
|
84
|
+
| `arudha_padas` | All 12 Arudha Padas (A1–A12) with BPHS exception rule |
|
|
85
|
+
| `upapada` | Upapada Lagna (A12) with lord and 2nd from UL |
|
|
86
|
+
| `karakamsha` | AK in Navamsha, Ishta Devata, planets in Karakamsha |
|
|
87
|
+
|
|
88
|
+
## Features
|
|
89
|
+
|
|
90
|
+
- **Natal Chart** — Lagna, 9 grahas, whole-sign houses, nakshatras with padas, dignities
|
|
91
|
+
- **14 Divisional Charts** — D2, D3, D4, D7, D9, D10, D12, D16, D20, D24, D27, D30, D40, D60
|
|
92
|
+
- **Planetary Strength** — Dignity (B.V. Raman), combustion (BPHS orbs), Digbala, Shadbala (6-fold), Ishta/Kashta Phala
|
|
93
|
+
- **BPHS Aspects** — 7th for all, special aspects for Mars (4th/8th), Jupiter (5th/9th), Saturn (3rd/10th)
|
|
94
|
+
- **Vimshottari Dasha** — 5 levels (Maha → Antar → Pratyantar → Sukshma → Prana), 120-year timeline
|
|
95
|
+
- **24 Yoga Types** — Pancha Mahapurusha, Gajakesari, Budhaditya, Raj Yoga, Neecha Bhanga, Parivartana, Dhana, and more
|
|
96
|
+
- **Ashtakavarga** — SAV, BAV, Prashtara (source-level bindu contributions)
|
|
97
|
+
- **Jaimini** — 7 Karakas, Arudha Padas (A1–A12), Upapada Lagna, Karakamsha
|
|
98
|
+
- **Compatibility** — 8 Ashtakoot kutas (36 pts) + Mahendra, Stree Deergha, Vedha, Rajju, Kuja Dosha
|
|
99
|
+
- **Muhurtha** — 6 activity types with Panchang Suddhi and marriage doshas
|
|
100
|
+
- **Career** — D10 analysis with planet-career significations and domain recommendations
|
|
101
|
+
- **Bhava Chalit** — Equal-house chart from Lagna midpoint
|
|
102
|
+
- **Avasthas** — 5 planetary age-states per BPHS
|
|
103
|
+
- **Kaal Sarpa, Graha Yuddha, Gandanta** — Dosha and junction detection
|
|
104
|
+
|
|
105
|
+
## Architecture
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
dashaflow/
|
|
109
|
+
├── __init__.py Public API (5 functions)
|
|
110
|
+
├── vedic_calculator.py Core engine — Swiss Ephemeris computations
|
|
111
|
+
├── constants.py Zodiac, nakshatras, dignity tables
|
|
112
|
+
├── nakshatra.py Nakshatra lookup from longitude
|
|
113
|
+
├── panchang.py Tithi, Vara, Yoga, Karana
|
|
114
|
+
├── yoga.py 24 yoga types + Kaal Sarpa, Graha Yuddha, Gandanta
|
|
115
|
+
├── dasha.py Vimshottari Dasha (5 levels)
|
|
116
|
+
├── dignity.py Dignity, combustion, digbala
|
|
117
|
+
├── ashtakavarga.py SAV, BAV, Prashtara
|
|
118
|
+
├── jaimini.py Karakas, Arudha Padas, Upapada, Karakamsha
|
|
119
|
+
├── shadbala.py Six-fold strength + Ishta/Kashta Phala
|
|
120
|
+
├── matchmaking.py 16-factor compatibility + Kuja Dosha
|
|
121
|
+
├── muhurtha.py Electional astrology
|
|
122
|
+
└── career.py D10 career analysis
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Ayanamsha
|
|
126
|
+
|
|
127
|
+
All calculations use **Lahiri (Chitrapaksha)** — the official standard of the Indian government and the most widely used system in Vedic astrology.
|
|
128
|
+
|
|
129
|
+
## Extended Ephemeris
|
|
130
|
+
|
|
131
|
+
The bundled Swiss Ephemeris files cover ~1800–2400 AD. For historical or far-future charts, download additional `.se1` files from [astro.com](https://www.astro.com/swisseph/) and pass the path:
|
|
132
|
+
|
|
133
|
+
```python
|
|
134
|
+
chart = dashaflow.cast_chart("1200-03-10", "12:00", 28.61, 77.21, "Asia/Kolkata",
|
|
135
|
+
ephe_path="/path/to/extended/ephemeris")
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## References
|
|
139
|
+
|
|
140
|
+
- *Brihat Parashara Hora Shastra* — foundational text for Vedic astrology
|
|
141
|
+
- *Hindu Predictive Astrology* — B.V. Raman
|
|
142
|
+
- [Swiss Ephemeris](https://www.astro.com/swisseph/) — high-precision astronomical computation
|
|
143
|
+
|
|
144
|
+
## License
|
|
145
|
+
|
|
146
|
+
MIT
|
|
147
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "dashaflow"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Vedic astrology calculation engine — Swiss Ephemeris with Sidereal Lahiri ayanamsha"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Adarsh J" },
|
|
14
|
+
]
|
|
15
|
+
keywords = ["vedic", "astrology", "jyotish", "horoscope", "dashaflow", "vimshottari", "navamsha"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Topic :: Scientific/Engineering :: Astronomy",
|
|
26
|
+
"Topic :: Religion",
|
|
27
|
+
]
|
|
28
|
+
dependencies = [
|
|
29
|
+
"pyswisseph>=2.10.3",
|
|
30
|
+
"pytz>=2024.1",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
Homepage = "https://github.com/adarshj322/dashaflow"
|
|
35
|
+
Repository = "https://github.com/adarshj322/dashaflow"
|
|
36
|
+
Issues = "https://github.com/adarshj322/dashaflow/issues"
|
|
37
|
+
|
|
38
|
+
[tool.hatch.version]
|
|
39
|
+
path = "src/dashaflow/_version.py"
|
|
40
|
+
|
|
41
|
+
[tool.hatch.build.targets.wheel]
|
|
42
|
+
packages = ["src/dashaflow"]
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
"""
|
|
2
|
+
DashaFlow — Vedic Astrology Calculation Engine
|
|
3
|
+
===============================================
|
|
4
|
+
|
|
5
|
+
Swiss Ephemeris with Sidereal Lahiri ayanamsha.
|
|
6
|
+
Rooted in Brihat Parashara Hora Shastra (BPHS) and B.V. Raman's Hindu Predictive Astrology.
|
|
7
|
+
|
|
8
|
+
Quick start::
|
|
9
|
+
|
|
10
|
+
import dashaflow
|
|
11
|
+
|
|
12
|
+
chart = dashaflow.cast_chart("1990-04-15", "14:30", 28.6139, 77.2090, "Asia/Kolkata")
|
|
13
|
+
print(chart["lagna"]["sign"]) # e.g. "Leo"
|
|
14
|
+
print(chart["planets"]["Moon"]) # full Moon data
|
|
15
|
+
print(chart["yogas"]) # detected yogas
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from ._version import __version__
|
|
19
|
+
from ._validation import validate_birth_input
|
|
20
|
+
from .vedic_calculator import calculate_vedic_chart, calculate_transit
|
|
21
|
+
from .matchmaking import calculate_ashtakoot, calc_kuja_dosha, match_kuja_dosha
|
|
22
|
+
from .muhurtha import evaluate_muhurtha, ACTIVITY_RULES
|
|
23
|
+
from .career import analyze_career as _analyze_career_internal
|
|
24
|
+
from .constants import ZODIAC_SIGNS
|
|
25
|
+
|
|
26
|
+
__all__ = [
|
|
27
|
+
"__version__",
|
|
28
|
+
"cast_chart",
|
|
29
|
+
"cast_transit",
|
|
30
|
+
"calculate_compatibility",
|
|
31
|
+
"check_muhurtha",
|
|
32
|
+
"analyze_career",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def cast_chart(
|
|
37
|
+
dob: str,
|
|
38
|
+
time: str,
|
|
39
|
+
lat: float,
|
|
40
|
+
lon: float,
|
|
41
|
+
timezone: str,
|
|
42
|
+
query_date: str = None,
|
|
43
|
+
ephe_path: str = '',
|
|
44
|
+
) -> dict:
|
|
45
|
+
"""
|
|
46
|
+
Cast a complete Vedic natal chart (Sidereal Lahiri ayanamsha).
|
|
47
|
+
|
|
48
|
+
Returns a dict with: metadata, panchang, lagna, planets (with dignity,
|
|
49
|
+
combustion, aspects, 14 varga signs), dashas (5 levels), yogas (24 types),
|
|
50
|
+
ashtakavarga, jaimini_karakas, shadbala, bhava_chalit, avasthas,
|
|
51
|
+
kaal_sarpa, graha_yuddha, gandanta, arudha_padas, upapada, karakamsha.
|
|
52
|
+
|
|
53
|
+
Parameters
|
|
54
|
+
----------
|
|
55
|
+
dob : str
|
|
56
|
+
Date of birth as "YYYY-MM-DD"
|
|
57
|
+
time : str
|
|
58
|
+
Time of birth as "HH:MM" (24-hour)
|
|
59
|
+
lat : float
|
|
60
|
+
Birth latitude (-90 to 90)
|
|
61
|
+
lon : float
|
|
62
|
+
Birth longitude (-180 to 180)
|
|
63
|
+
timezone : str
|
|
64
|
+
IANA timezone (e.g. "Asia/Kolkata")
|
|
65
|
+
query_date : str, optional
|
|
66
|
+
Date for Dasha lookup as "YYYY-MM-DD". Defaults to today.
|
|
67
|
+
ephe_path : str, optional
|
|
68
|
+
Path to Swiss Ephemeris data files. Defaults to '' (bundled).
|
|
69
|
+
|
|
70
|
+
Returns
|
|
71
|
+
-------
|
|
72
|
+
dict
|
|
73
|
+
Complete chart data.
|
|
74
|
+
|
|
75
|
+
Raises
|
|
76
|
+
------
|
|
77
|
+
ValueError
|
|
78
|
+
If any input parameter is invalid.
|
|
79
|
+
"""
|
|
80
|
+
validate_birth_input(dob, time, lat, lon, timezone)
|
|
81
|
+
return calculate_vedic_chart(
|
|
82
|
+
dob_str=dob,
|
|
83
|
+
time_str=time,
|
|
84
|
+
lat=lat,
|
|
85
|
+
lon=lon,
|
|
86
|
+
timezone_str=timezone,
|
|
87
|
+
query_date_str=query_date,
|
|
88
|
+
ephe_path=ephe_path,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def cast_transit(
|
|
93
|
+
transit_date: str,
|
|
94
|
+
natal_chart: dict,
|
|
95
|
+
timezone: str = "Asia/Kolkata",
|
|
96
|
+
) -> dict:
|
|
97
|
+
"""
|
|
98
|
+
Calculate planetary transits overlaid on a natal chart.
|
|
99
|
+
|
|
100
|
+
Parameters
|
|
101
|
+
----------
|
|
102
|
+
transit_date : str
|
|
103
|
+
Date to compute transits as "YYYY-MM-DD"
|
|
104
|
+
natal_chart : dict
|
|
105
|
+
Full dict output from cast_chart()
|
|
106
|
+
timezone : str, optional
|
|
107
|
+
IANA timezone. Defaults to "Asia/Kolkata".
|
|
108
|
+
|
|
109
|
+
Returns
|
|
110
|
+
-------
|
|
111
|
+
dict
|
|
112
|
+
Transit planets with house positions, SAV points, Sade Sati, Rahu-Ketu axis.
|
|
113
|
+
"""
|
|
114
|
+
return calculate_transit(
|
|
115
|
+
transit_date_str=transit_date,
|
|
116
|
+
natal_chart=natal_chart,
|
|
117
|
+
timezone_str=timezone,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def calculate_compatibility(
|
|
122
|
+
dob1: str, time1: str, lat1: float, lon1: float, tz1: str,
|
|
123
|
+
dob2: str, time2: str, lat2: float, lon2: float, tz2: str,
|
|
124
|
+
) -> dict:
|
|
125
|
+
"""
|
|
126
|
+
Calculate 36-point Ashtakoot compatibility + Kuja Dosha.
|
|
127
|
+
|
|
128
|
+
Person 1 = Male, Person 2 = Female (by tradition for accurate scoring).
|
|
129
|
+
|
|
130
|
+
Parameters
|
|
131
|
+
----------
|
|
132
|
+
dob1, time1, lat1, lon1, tz1 : Birth details for Person 1 (Male)
|
|
133
|
+
dob2, time2, lat2, lon2, tz2 : Birth details for Person 2 (Female)
|
|
134
|
+
|
|
135
|
+
Returns
|
|
136
|
+
-------
|
|
137
|
+
dict
|
|
138
|
+
8 Ashtakoot kutas (36 pts), extended kutas (Mahendra, Stree Deergha,
|
|
139
|
+
Vedha, Rajju, etc.), Kuja Dosha analysis with compatibility verdict.
|
|
140
|
+
"""
|
|
141
|
+
validate_birth_input(dob1, time1, lat1, lon1, tz1)
|
|
142
|
+
validate_birth_input(dob2, time2, lat2, lon2, tz2)
|
|
143
|
+
|
|
144
|
+
chart1 = calculate_vedic_chart(dob1, time1, lat1, lon1, tz1)
|
|
145
|
+
chart2 = calculate_vedic_chart(dob2, time2, lat2, lon2, tz2)
|
|
146
|
+
|
|
147
|
+
m_moon = chart1["planets"]["Moon"]
|
|
148
|
+
f_moon = chart2["planets"]["Moon"]
|
|
149
|
+
|
|
150
|
+
m_lon = ZODIAC_SIGNS.index(m_moon["sign"]) * 30 + m_moon["degree"]
|
|
151
|
+
f_lon = ZODIAC_SIGNS.index(f_moon["sign"]) * 30 + f_moon["degree"]
|
|
152
|
+
|
|
153
|
+
score = calculate_ashtakoot(m_lon, f_lon, male_chart=chart1, female_chart=chart2)
|
|
154
|
+
|
|
155
|
+
male_dosha = calc_kuja_dosha(chart1)
|
|
156
|
+
female_dosha = calc_kuja_dosha(chart2)
|
|
157
|
+
kuja_match = match_kuja_dosha(male_dosha["total_score"], female_dosha["total_score"])
|
|
158
|
+
score["kuja_dosha"] = {
|
|
159
|
+
"male": male_dosha,
|
|
160
|
+
"female": female_dosha,
|
|
161
|
+
"compatibility": kuja_match,
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
return score
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def check_muhurtha(
|
|
168
|
+
activity: str,
|
|
169
|
+
date: str,
|
|
170
|
+
time: str,
|
|
171
|
+
lat: float,
|
|
172
|
+
lon: float,
|
|
173
|
+
timezone: str,
|
|
174
|
+
) -> dict:
|
|
175
|
+
"""
|
|
176
|
+
Check if a date/time is auspicious for a specific activity.
|
|
177
|
+
|
|
178
|
+
Parameters
|
|
179
|
+
----------
|
|
180
|
+
activity : str
|
|
181
|
+
One of: 'marriage', 'travel', 'business', 'education', 'house_entry', 'medical'
|
|
182
|
+
date : str
|
|
183
|
+
Date as "YYYY-MM-DD"
|
|
184
|
+
time : str
|
|
185
|
+
Time as "HH:MM" (24-hour)
|
|
186
|
+
lat : float
|
|
187
|
+
Location latitude
|
|
188
|
+
lon : float
|
|
189
|
+
Location longitude
|
|
190
|
+
timezone : str
|
|
191
|
+
IANA timezone string
|
|
192
|
+
|
|
193
|
+
Returns
|
|
194
|
+
-------
|
|
195
|
+
dict
|
|
196
|
+
Verdict (auspicious/mixed/inauspicious), score, factors, panchang_suddhi.
|
|
197
|
+
"""
|
|
198
|
+
validate_birth_input(date, time, lat, lon, timezone)
|
|
199
|
+
if activity not in ACTIVITY_RULES:
|
|
200
|
+
raise ValueError(f"Unknown activity '{activity}'. Supported: {list(ACTIVITY_RULES.keys())}")
|
|
201
|
+
|
|
202
|
+
chart = calculate_vedic_chart(date, time, lat, lon, timezone)
|
|
203
|
+
panchang = chart.get("panchang", {})
|
|
204
|
+
planets = chart.get("planets", {})
|
|
205
|
+
lagna_sign = chart.get("lagna", {}).get("sign")
|
|
206
|
+
return evaluate_muhurtha(activity, panchang, planets, lagna_sign)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def analyze_career(
|
|
210
|
+
dob: str,
|
|
211
|
+
time: str,
|
|
212
|
+
lat: float,
|
|
213
|
+
lon: float,
|
|
214
|
+
timezone: str,
|
|
215
|
+
) -> dict:
|
|
216
|
+
"""
|
|
217
|
+
Analyze career potential using the 10th house, D10 Dashamsha, and planetary significations.
|
|
218
|
+
|
|
219
|
+
Parameters
|
|
220
|
+
----------
|
|
221
|
+
dob : str
|
|
222
|
+
Date of birth as "YYYY-MM-DD"
|
|
223
|
+
time : str
|
|
224
|
+
Time of birth as "HH:MM" (24-hour)
|
|
225
|
+
lat : float
|
|
226
|
+
Birth latitude
|
|
227
|
+
lon : float
|
|
228
|
+
Birth longitude
|
|
229
|
+
timezone : str
|
|
230
|
+
IANA timezone string
|
|
231
|
+
|
|
232
|
+
Returns
|
|
233
|
+
-------
|
|
234
|
+
dict
|
|
235
|
+
10th house analysis, D10 indicators, career themes, strength factors.
|
|
236
|
+
"""
|
|
237
|
+
validate_birth_input(dob, time, lat, lon, timezone)
|
|
238
|
+
chart = calculate_vedic_chart(dob, time, lat, lon, timezone)
|
|
239
|
+
planets = chart.get("planets", {})
|
|
240
|
+
lagna_sign = chart.get("lagna", {}).get("sign")
|
|
241
|
+
return _analyze_career_internal(planets, lagna_sign)
|