Skip to main content

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.

Release files for panchanga 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for panchanga 0.1.2
File Size Uploaded
panchanga-0.1.2.tar.gz 51.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for panchanga 0.1.2
File Interpreter ABI Platform
panchanga-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 70.0 kB

Release files / panchanga-0.1.2.tar.gz

Download URL panchanga-0.1.2.tar.gz
Size 51.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ef1f04bf4eeb07668a4629b2c03568acf6b7405b7c894b07332dbbb0a842d948
BLAKE2b-256 checksum
How to use checksums
bf4f0349e06a06be534b9c94d26c8df7cbc297a3be5308d7b7b4cd53da58bb03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release files / panchanga-0.1.2-py3-none-any.whl

Download URL panchanga-0.1.2-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23903ba5038b0a605875e0476363fa328698d6127d77d533aa32deea5560d734
BLAKE2b-256 checksum
How to use checksums
cf4ea6517c9d04c661fd2cf01d1f30de5deccd83a730b6200744035e3e1f5b9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page