Skip to content

Commit 115ad48

Browse files
committed
updates 💘🚀🤘
1 parent 7922c3a commit 115ad48

16 files changed

Lines changed: 240 additions & 113 deletions

.github/workflows/auto-bump-version.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ jobs:
2525
new_version="${major}.${minor}.${patch}"
2626
echo "NEW_VERSION=$new_version" >> $GITHUB_ENV
2727
28-
- name: Update version in meta.yaml
29-
run: |
30-
sed -i "s/version: .*/version: $NEW_VERSION/" vedastro/meta.yaml
31-
3228
- name: Update version in setup.py
3329
run: |
3430
sed -i "s/version='.*'/version='$NEW_VERSION'/" setup.py

.gitignore

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
1+
# Python
2+
__pycache__/
3+
*.pyc
4+
*.pyo
5+
*.egg-info/
6+
dist/
7+
build/
8+
.eggs/
19

2-
vedastro/__pycache__/
3-
10+
# IDE
11+
.idea/
412
.vs/
13+
.claude/
514

6-
__pycache__/
15+
# Virtual environments
16+
venv/
17+
.venv/
18+
19+
# Testing
20+
.pytest_cache/
21+
.coverage
22+
23+
# Generated output
24+
*.csv
25+
26+
# Environment
27+
.env
28+
.env.local

README.md

Lines changed: 134 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,176 @@
1-
# VedAstro Python
1+
<p align="center">
2+
<img src="docs/banner.png" alt="VedAstro - Vedic Astrology Engine for Python" width="100%"/>
3+
</p>
24

3-
[![PyPI version](https://img.shields.io/pypi/v/vedastro)](https://pypi.org/project/vedastro/)
4-
[![Python](https://img.shields.io/pypi/pyversions/vedastro)](https://pypi.org/project/vedastro/)
5-
[![License](https://img.shields.io/github/license/VedAstro/VedAstro.Python)](https://github.com/VedAstro/VedAstro.Python/blob/main/LICENSE)
5+
<p align="center">
6+
<em>The most comprehensive Vedic astrology library for Python — 596 calculations, one line of code.</em>
7+
</p>
68

7-
Python wrapper for the [VedAstro.org](https://vedastro.org) Vedic Astrology API. Perform complex Vedic astrology calculations including planet positions, house analysis, match compatibility, event predictions, and more.
9+
<p align="center">
10+
<a href="https://pypi.org/project/vedastro/"><img src="https://img.shields.io/pypi/v/vedastro?style=flat-square&color=f6d365&label=PyPI" alt="PyPI version"/></a>
11+
<a href="https://pypi.org/project/vedastro/"><img src="https://img.shields.io/pypi/pyversions/vedastro?style=flat-square&color=a78bfa" alt="Python versions"/></a>
12+
<a href="https://pepy.tech/project/vedastro"><img src="https://img.shields.io/pepy/dt/vedastro?style=flat-square&color=818cf8&label=Downloads" alt="Downloads"/></a>
13+
<a href="https://github.com/VedAstro/VedAstro.Python/blob/main/LICENSE"><img src="https://img.shields.io/github/license/VedAstro/VedAstro.Python?style=flat-square&color=fda085" alt="License"/></a>
14+
<a href="https://github.com/VedAstro/VedAstro.Python/stargazers"><img src="https://img.shields.io/github/stars/VedAstro/VedAstro.Python?style=flat-square&color=f6d365" alt="Stars"/></a>
15+
</p>
816

9-
## Features
17+
---
1018

11-
- **596 API methods** auto-generated from the VedAstro engine
12-
- Planet positions, houses, divisional charts (D1-D60)
13-
- Match compatibility (Kuta system) reports
14-
- Muhurtha / event predictions with time ranges
15-
- AI-powered birth time lookup for famous persons
16-
- Vimshottari Dasa period calculations
19+
## Why VedAstro?
20+
21+
| | |
22+
|---|---|
23+
| **596+ Calculations** | Planet positions, house data, divisional charts (D1–D60), yogas, dasas, and more |
24+
| **47 Ayanamsa Systems** | Lahiri, Raman, Krishnamurti, Fagan-Bradley (Western), and 43 others |
25+
| **Match Compatibility** | Full Kuta-based compatibility reports between two horoscopes |
26+
| **Zero Setup** | Cloud-powered engine — just `pip install` and start calculating |
27+
| **AI Features** | Birth time auto-fill, horoscope search by natural language |
28+
29+
---
1730

1831
## Installation
1932

2033
```bash
2134
pip install vedastro
2235
```
2336

37+
---
38+
2439
## Quick Start
2540

41+
### Planet Positions
42+
2643
```python
2744
from vedastro import *
2845

29-
# Optional: set API key (get one at vedastro.org/Account)
30-
# Calculate.SetAPIKey("your-api-key")
46+
Calculate.SetAPIKey('FreeAPIUser') # get your key at vedastro.org/API.html
3147

32-
# Create location and time
3348
geo = GeoLocation("Tokyo, Japan", 139.83, 35.65)
3449
birth_time = Time(hour=23, minute=40, day=31, month=12, year=2010, offset="+08:00", geolocation=geo)
3550

36-
# Alternative: single string format
37-
# birth_time = Time("23:40 31/12/2010 +08:00", geo)
38-
39-
# Planet data
40-
result = Calculate.AllPlanetData(birth_time, PlanetName.Sun)
51+
result = Calculate.AllPlanetData(PlanetName.Sun, birth_time)
4152
Tools.Print(result)
53+
```
4254

43-
# House data
44-
result = Calculate.AllHouseData(birth_time, HouseName.House1)
45-
Tools.Print(result)
55+
### Match Compatibility
56+
57+
```python
58+
from vedastro import *
59+
60+
Calculate.SetAPIKey('FreeAPIUser')
4661

47-
# Match compatibility
48-
male_geo = GeoLocation("New York, USA", -74.006, 40.7128)
49-
male_time = Time("14:30 15/06/1990 -05:00", male_geo)
50-
female_geo = GeoLocation("London, UK", -0.1276, 51.5074)
51-
female_time = Time("09:15 22/03/1992 +00:00", female_geo)
62+
romeo = Time("23:40 31/12/1996 +08:00", GeoLocation("Tokyo, Japan", 139.83, 35.65))
63+
juliet = Time("14:30 15/06/1997 -05:00", GeoLocation("New York, USA", -74.006, 40.7128))
5264

53-
match = Calculate.MatchReport(male_time, female_time)
54-
print(match)
65+
match = Calculate.MatchReport(romeo, juliet)
66+
Tools.Print(match)
5567
```
5668

57-
## API Key
69+
### Vimshottari Dasa
70+
71+
```python
72+
from vedastro import *
73+
import json
74+
75+
Calculate.SetAPIKey('FreeAPIUser')
76+
77+
geo = GeoLocation("Tokyo, Japan", 139.83, 35.65)
78+
birth_time = Time("23:40 31/12/2010 +08:00", geo)
79+
start = Time("00:00 01/01/2020 +08:00", geo)
80+
end = Time("23:59 31/12/2025 +08:00", geo)
81+
82+
dasa = Calculate.DasaAtRange(birth_time, start, end, levels=3, precision_hours=100)
83+
print(json.dumps(dasa, indent=4))
84+
```
85+
86+
---
87+
88+
## What Can You Calculate?
89+
90+
| Category | Examples | Description |
91+
|:---------|:---------|:------------|
92+
| **Planets** | `AllPlanetData`, `PlanetNirayanaLongitude`, `PlanetsInConjunction` | Positions, strengths, aspects, conjunctions |
93+
| **Houses** | `AllHouseData`, `HouseSignName`, `AllHouseRasiSigns` | Bhava charts, house lords, sign placements |
94+
| **Zodiac** | `AllZodiacSignData`, `IsPlanetInSign` | Sign-based calculations |
95+
| **Matching** | `MatchReport`, `MatchReportWithBazi`, `MatchChat` | Kuta compatibility, AI chat analysis |
96+
| **Events** | `EventsAtTime`, `EventsAtRange`, `EventStartTime` | Muhurtha, event predictions |
97+
| **Dasa** | `DasaAtRange` | Vimshottari dasa periods with configurable depth |
98+
| **AI** | `BirthTimeAutoAIFill`, `HoroscopeLLMSearch` | Machine learning birth time, natural language search |
99+
| **Divisional** | `AllHouseNavamshaSigns`, `AllHouseDrekkanaSigns`, etc. | D1 through D60 charts |
58100

59-
- Without an API key, requests use the free tier (rate limited)
60-
- Get a subscriber API key at [vedastro.org/Account](https://vedastro.org/Account)
61-
- Set it before making calls: `Calculate.SetAPIKey("your-key")`
101+
Full API reference: [vedastro.org/API.html](https://vedastro.org/API.html)
62102

63-
## Method Categories
103+
---
64104

65-
| Category | Examples |
66-
|----------|---------|
67-
| **Planet** | `AllPlanetData`, `PlanetNirayanaLongitude`, `PlanetsInConjunction` |
68-
| **House** | `AllHouseData`, `HouseSignName`, `AllHouseRasiSigns` |
69-
| **Zodiac** | `AllZodiacSignData`, `IsPlanetInSign` |
70-
| **Match** | `MatchReport`, `MatchReportWithBazi`, `MatchChat` |
71-
| **Events** | `EventsAtTime`, `EventsAtRange`, `EventStartTime` |
72-
| **AI** | `BirthTimeAutoAIFill`, `HoroscopeLLMSearch` |
73-
| **Divisional Charts** | `AllHouseNavamshaSigns`, `AllHouseDrekkanaSigns`, etc. |
105+
## Custom Ayanamsa
74106

75-
Full API reference: [vedastro.org/APIBuilder](https://vedastro.org/APIBuilder)
107+
By default, calculations use the **Raman** ayanamsa. Switch to any of the 47 supported systems:
108+
109+
```python
110+
# Vedic — Lahiri
111+
Calculate.SetAyanamsa(Ayanamsa.Lahiri)
112+
113+
# Western astrology — Fagan-Bradley
114+
Calculate.SetAyanamsa(Ayanamsa.Fagan_Bradley)
115+
116+
# KP System — Krishnamurti
117+
Calculate.SetAyanamsa(Ayanamsa.Krishnamurti)
118+
```
119+
120+
---
121+
122+
## API Key
123+
124+
| Tier | Speed | How |
125+
|:-----|:------|:----|
126+
| **Free** | Rate limited | No key needed, or use `'FreeAPIUser'` |
127+
| **Subscriber** | Unlimited | Get key at [vedastro.org/API.html](https://vedastro.org/API.html) |
128+
129+
```python
130+
Calculate.SetAPIKey('your-key-here')
131+
```
132+
133+
---
76134

77135
## How It Works
78136

79-
This package calls the VedAstro REST API, which runs the core Vedic astrology engine on cloud servers. All calculations are performed server-side — no local dependencies beyond Python and `requests`.
137+
```
138+
Your Python Code → vedastro pip library → REST API → VedAstro Engine (cloud)
139+
```
140+
141+
All calculations run server-side on the VedAstro engine. No local dependencies beyond Python and `requests`. No DLLs, no native binaries, no setup.
142+
143+
---
144+
145+
## Examples
146+
147+
| Demo File | What It Shows |
148+
|:----------|:-------------|
149+
| [`demo_all_astro_data.py`](demo_all_astro_data.py) | All planet and house data for a birth chart |
150+
| [`demo_all_astro_data_json_output.py`](demo_all_astro_data_json_output.py) | Same as above, with JSON output |
151+
| [`demo_all_astro_data_csv.py`](demo_all_astro_data_csv.py) | Export astro data to CSV with pandas |
152+
| [`demo_all_planet_data.py`](demo_all_planet_data.py) | Detailed planet positions with degree parsing |
153+
| [`demo_bhava_chart_data.py`](demo_bhava_chart_data.py) | Bhava chart house signs and planet placements |
154+
| [`demo_code_from_api_builder.py`](demo_code_from_api_builder.py) | Code generated from the API Builder tool |
155+
| [`demo_custom_ayanamsa.py`](demo_custom_ayanamsa.py) | Using a custom ayanamsa system |
156+
| [`demo_horoscope_prediction_names.py`](demo_horoscope_prediction_names.py) | Horoscope prediction event names |
157+
| [`demo_match_checker.py`](demo_match_checker.py) | Match compatibility report between two charts |
158+
| [`demo_vimshottari_dasa.py`](demo_vimshottari_dasa.py) | Vimshottari dasa periods for a time range |
159+
160+
---
80161

81162
## Contributing
82163

83164
Contributions welcome! Please open an issue or submit a pull request.
84165

85-
**Important:** `vedastro/calculate.py` is auto-generated by the [StaticTableGenerator](https://github.com/VedAstro/VedAstro) in the main repo. Do not edit it directly.
166+
> **Note:** `vedastro/calculate.py` is auto-generated by the [StaticTableGenerator](https://github.com/VedAstro/VedAstro) in the main repo. Do not edit it directly.
86167
87168
## License
88169

89170
Released under the [MIT License](LICENSE).
171+
172+
---
173+
174+
<p align="center">
175+
<em>Made & Funded by Users — <a href="https://vedastro.org/Donate">Support VedAstro</a></em>
176+
</p>

demo_all_astro_data.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
from vedastro import * # install via pip
22

3+
# PART 0 : Set API key
4+
Calculate.SetAPIKey('FreeAPIUser') # ⚡ unlimited speed API key from "vedastro.org/API.html"
35

4-
#PART 1 : PREPARE NEEDED DATA
6+
# PART 1 : PREPARE NEEDED DATA
57
#-----------------------------------
68

79
# set birth location

demo_all_astro_data_csv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import json
55

66
# PART 0 : Set API key
7-
Calculate.SetAPIKey('FreeAPIUser') # ⚡ unlimited speed API key from "vedastro.org/Account"
7+
Calculate.SetAPIKey('FreeAPIUser') # ⚡ unlimited speed API key from "vedastro.org/API.html"
88

99
# PART 1 : PREPARE NEEDED DATA
1010
# -----------------------------------

demo_all_astro_data_json_output.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
from vedastro import * # install via pip
2+
3+
# PART 0 : Set API key
4+
Calculate.SetAPIKey('FreeAPIUser') # ⚡ unlimited speed API key from "vedastro.org/API.html"
5+
6+
# PART 1 : PREPARE NEEDED DATA
7+
#-----------------------------------
8+
9+
# set birth location
10+
geolocation = GeoLocation("Tokyo, Japan", 139.83, 35.65)
11+
12+
# group all birth time data together (day/month/year)
13+
birth_time = Time("23:40 31/12/2010 +08:00", geolocation)
14+
15+
16+
#PART 2 : CALCULATE ALL DATA
17+
#-----------------------------------
18+
19+
#PLANETS
20+
allPlanetDataList = Calculate.AllPlanetData(PlanetName.Sun, birth_time)
21+
jsonStringA = Tools.AnyToJSON("", allPlanetDataList)
22+
print(jsonStringA)
23+
24+
#HOUSES
25+
allHouseDataList = Calculate.AllHouseData(HouseName.House1, birth_time)
26+
jsonStringB = Tools.AnyToJSON("", allHouseDataList)
27+
print(jsonStringB)
28+
29+
#ZODIAC SIGNS
30+
allZodiacDataList = Calculate.AllZodiacSignData(ZodiacName.Gemini, birth_time)
31+
jsonStringC = Tools.AnyToJSON("", allZodiacDataList)
32+
print(jsonStringC)

demo_all_horoscope_for_llm.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

demo_all_planet_data.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
from vedastro import * # install via pip
22
import re
33

4-
#PART 1 : Define CALCULATE Planet DATA Function
4+
# PART 0 : Set API key
5+
Calculate.SetAPIKey('FreeAPIUser') # ⚡ unlimited speed API key from "vedastro.org/API.html"
6+
7+
# PART 1 : Define CALCULATE Planet DATA Function
58
#---------------------------------------
69
def getplanetinfo(planet, time):
710

demo_bhava_chart_data.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# THIS DEMO CALCULATES DATA NEEDED TO MAKE BHAVA CHART
44

55
# PART 0 : Set API key
6-
Calculate.SetAPIKey('FreeAPIUser') # ⚡unlimited speed API key from "vedastro.org/Account"
6+
Calculate.SetAPIKey('FreeAPIUser') # ⚡ unlimited speed API key from "vedastro.org/API.html"
77

8-
#PART 1 : PREPARE NEEDED DATA
8+
# PART 1 : PREPARE NEEDED DATA
99
#-----------------------------------
1010

1111
# set birth location
@@ -19,16 +19,16 @@
1919
#-----------------------------------
2020

2121
# Get the sign for House 1
22-
house1ZodiacSign = Calculate.HouseZodiacSign(HouseName.House1, birth_time)
23-
print(json.dumps(house1ZodiacSign, indent=4))
22+
house1ZodiacSign = Calculate.HouseSignName(HouseName.House1, birth_time)
23+
Tools.Print(house1ZodiacSign)
2424

2525
# Get Planets in House 1 (Bhava Chart)
26-
planetsInHouse1 = Calculate.PlanetsInHouse(HouseName.House1, birth_time)
27-
print(json.dumps(planetsInHouse1, indent=4))
26+
planetsInHouse1 = Calculate.PlanetsInHouseBasedOnSign(HouseName.House1, birth_time)
27+
Tools.Print(planetsInHouse1)
2828

2929
# Get Planets in House 1 (Rasi Chart)
30-
planetsInHouse1BasedOnSign = Calculate.PlanetsInHouseBasedOnSign(HouseName.House1, birth_time)
31-
print(json.dumps(planetsInHouse1BasedOnSign, indent=4))
30+
planetsInHouse1 = Calculate.PlanetsInHouseBasedOnSign(HouseName.House1, birth_time)
31+
Tools.Print(planetsInHouse1)
3232

3333

3434
# Get the sign for House 2

demo_code_from_api_builder.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
from vedastro import *
1+
from vedastro import * # install via pip
2+
3+
# PART 0 : Set API key
4+
Calculate.SetAPIKey('FreeAPIUser') # ⚡ unlimited speed API key from "vedastro.org/API.html"
5+
6+
# PART 1 : PREPARE NEEDED DATA
7+
#-----------------------------------
28

39
# set location
410
geolocation = GeoLocation("Tokyo, Japan", 139.83, 35.65)
@@ -10,7 +16,7 @@
1016
planetName = PlanetName.Sun
1117

1218
# run calculator to get result
13-
calcResult = Calculate.HousePlanetIsIn(time, planetName)
19+
calcResult = Calculate.HousePlanetOccupiesBasedOnSign(planetName, time)
1420

1521
# display results
1622
Tools.Print(calcResult)

0 commit comments

Comments
 (0)