Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

panchanga-0.1.0.tar.gz (51.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

panchanga-0.1.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file panchanga-0.1.0.tar.gz.

File metadata

  • Download URL: panchanga-0.1.0.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

Hashes for panchanga-0.1.0.tar.gz
Algorithm Hash digest
SHA256 47ecf58d07de18c6b10d2d07fb89f3d9f55d4da7bfbadfc378aaa5713d528ae5
MD5 a3e97ada9e5dd1c80077c4443059c18e
BLAKE2b-256 5a5aa8ce609784ef76c1d63a8a812d1624ab7e8b4a67272ffdfd9df312e976fa

See more details on using hashes here.

File details

Details for the file panchanga-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: panchanga-0.1.0-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

Hashes for panchanga-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5b9ea336403a19058adb603e4cbad906a3d3749b5cecfed0952dee02d9abef1
MD5 952717f2fe0de1ba1af240707d0b3c3e
BLAKE2b-256 658a1ba6237bebc5c7038c409489d9feb3c4bc5ca7787bdc670513e698bcb359

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page