The VedAstro Python library gives you instant access to the world's most comprehensive Vedic astrology engine — planet positions, divisional charts, dasa periods, compatibility reports, and AI-powered features, all from a single pip install.
Whether you're building a horoscope app, a matchmaking platform, or a research tool, VedAstro's Python library removes every barrier between you and professional-grade Vedic astrology calculations. No complicated setup. No local binaries. No astrology expertise required to get started. Just install the library, set your API key, and start computing — the heavy lifting runs on VedAstro's cloud engine.
Calculations — the largest collection in any astrology programming library
Ayanamsa systems — Lahiri, Raman, KP, Fagan-Bradley & 43 more
Divisional charts — full Parashari varga system coverage
Birth time auto-fill and natural language horoscope search
Everything runs in the cloud — your app stays lightweight
MIT licensed, community maintained, fully auditable on GitHub
The VedAstro Python library is a thin, elegant wrapper around the VedAstro REST API. You write Python; the cloud does the calculation.
Write Python
Thin wrapper
Heavy lifting
Instant data
The library itself is tiny — everything runs server-side
Calculation improvements roll out on the server automatically
From personal projects to production apps, same code works
Install the library from PyPI
pip install vedastro
That's it. No DLLs, no C extensions, no ephemeris files to download.
Get unlimited access for just $1/month — no rate limits, all features included
Instant activation • Cancel anytime • 99.9% uptime guarantee
Get a complete planetary dataset for any birth chart in three lines:
from vedastro import *
Calculate.SetAPIKey('your-api-key')
geo = GeoLocation("Tokyo, Japan", 139.83, 35.65)
birth_time = Time(hour=23, minute=40, day=31, month=12, year=2010, offset="+08:00", geolocation=geo)
result = Calculate.AllPlanetData(PlanetName.Sun, birth_time)
Tools.Print(result)
Full Kuta-based compatibility analysis between two horoscopes:
from vedastro import *
Calculate.SetAPIKey('your-api-key')
romeo = Time("23:40 31/12/1996 +08:00", GeoLocation("Tokyo, Japan", 139.83, 35.65))
juliet = Time("14:30 15/06/1997 -05:00", GeoLocation("New York, USA", -74.006, 40.7128))
match = Calculate.MatchReport(romeo, juliet)
Tools.Print(match)
Pull dasa periods for any date range at any depth of sub-periods:
from vedastro import *
import json
Calculate.SetAPIKey('your-api-key')
geo = GeoLocation("Tokyo, Japan", 139.83, 35.65)
birth_time = Time("23:40 31/12/2010 +08:00", geo)
start = Time("00:00 01/01/2020 +08:00", geo)
end = Time("23:59 31/12/2025 +08:00", geo)
dasa = Calculate.DasaAtRange(birth_time, start, end, levels=3, precision_hours=100)
print(json.dumps(dasa, indent=4))
Remove rate limits and get instant access to all 596+ calculations
| Category | What's Included |
|---|---|
| Positions, longitudes, strengths, aspects, conjunctions, retrograde status | |
| House signs, lords, bhava chart, all house data | |
| D1 through D60 — Navamsha, Drekkana, and all varga charts | |
| Sign-based calculations, planet-in-sign queries | |
| Vimshottari dasa periods with configurable depth and precision | |
| Auspicious time finding, event predictions over any date range | |
| Kuta scoring, full compatibility reports, BaZi integration, AI chat analysis | |
| Birth time auto-fill from partial data, natural language horoscope search |
Full method reference: vedastro.org/API.html
Switch ayanamsa systems with a single line
Modern Vedic standard
VedAstro default
KP System
Western sidereal
Calculate.SetAyanamsa(Ayanamsa.Lahiri)
Calculate.SetAyanamsa(Ayanamsa.Fagan_Bradley)
Calculate.SetAyanamsa(Ayanamsa.Krishnamurti)
Rate-limited
'FreeAPIUser'
No signup required — ideal for exploration and development
Unlimited access
High-speed access to all 596+ calculations for production apps
Calculate.SetAPIKey('your-key-here')
The GitHub repository includes a full set of demo scripts to get you started immediately
| Demo File | What It Shows |
|---|---|
demo_all_astro_data.py | All planet and house data for a birth chart |
demo_all_astro_data_json_output.py | Same output in JSON format |
demo_all_astro_data_csv.py | Export a full birth chart to CSV using pandas |
demo_all_planet_data.py | Detailed planet positions with degree parsing |
demo_bhava_chart_data.py | Bhava chart house signs and planet placements |
demo_custom_ayanamsa.py | Switching between ayanamsa systems |
demo_horoscope_prediction_names.py | Horoscope prediction event names |
demo_match_checker.py | Full compatibility report between two charts |
demo_vimshottari_dasa.py | Vimshottari dasa periods for a date range |
demo_code_from_api_builder.py | Auto-generated code from the API Builder tool |
The VedAstro Python library is fully open source under the MIT License. You can read the code, verify every API call, and contribute improvements back to the community. The library is maintained alongside the main VedAstro engine — when new calculations are added to the API, the Python wrapper updates to match.
Note: vedastro/calculate.py is auto-generated from the main VedAstro repository to stay in sync with the live API surface. All other library files are open to contributions.
Install the library, try the free tier, and see how fast you can go from zero to a working Vedic astrology application. When your project is ready for the real world, your API key is one click away.
pip install vedastro
Made and funded by users — Support VedAstro