Traditional Vedic calendar calculations based on Suryasiddhanta
Project description
Panchanga - Vedic Calendar Library
Pure Python library for traditional Vedic calendar (Panchanga) calculations based on Suryasiddhanta (ca. AD 1000).
Installation
pip install panchanga
Quick Example
import panchanga
# Convert Gregorian to Julian Day and Ahargana
jd = panchanga.modern_date_to_julian_day(2025, 3, 14)
ahargana = panchanga.julian_day_to_ahargana(jd)
# Get calendar information
kali_year = panchanga.ahargana_to_kali(ahargana)
saka_year = panchanga.kali_to_saka(kali_year)
vikrama_year = panchanga.saka_to_vikrama(saka_year)
# Calculate astronomical positions
tslong = panchanga.get_true_solar_longitude(ahargana)
tllong = panchanga.get_true_lunar_longitude(ahargana)
# Get lunar day (tithi)
tithi = panchanga.get_tithi(tllong, tslong)
tithi_day, ftithi = panchanga.get_tithi_set(tithi)
# Get naksatra
naksatra = panchanga.get_naksatra_name(tllong)
Features
- Date conversions (Gregorian ↔ Julian Day ↔ Ahargana)
- Vedic calendar era conversions (Kali, Saka, Vikrama)
- Lunar calculations (tithi, naksatra, yoga, karana)
- Solar calculations (saura masa, samkranti)
- Astronomical calculations (sun/moon longitudes)
- Sunrise time calculations
- Ayanamsa calculations
- Horoscope/birth chart calculations
Documentation
See API documentation for detailed usage.
Credits
Based on the Perl implementation by M. YANO and M. FUSHIMI (v3.14, 2014). Python port by Ayush Jha.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file panchanga-0.1.2.tar.gz.
File metadata
- Download URL: panchanga-0.1.2.tar.gz
- Upload date:
- Size: 51.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef1f04bf4eeb07668a4629b2c03568acf6b7405b7c894b07332dbbb0a842d948
|
|
| MD5 |
b35730146d733e882458f9d86beace72
|
|
| BLAKE2b-256 |
bf4f0349e06a06be534b9c94d26c8df7cbc297a3be5308d7b7b4cd53da58bb03
|
File details
Details for the file panchanga-0.1.2-py3-none-any.whl.
File metadata
- Download URL: panchanga-0.1.2-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23903ba5038b0a605875e0476363fa328698d6127d77d533aa32deea5560d734
|
|
| MD5 |
7a62daa5f1d620b674fdf3aa136167f0
|
|
| BLAKE2b-256 |
cf4ea6517c9d04c661fd2cf01d1f30de5deccd83a730b6200744035e3e1f5b9e
|