CLI tool for Vedic calendar calculations
Project description
Panchanga CLI
Command-line interface for Vedic calendar (Panchanga) calculations.
Installation
pip install panchanga-cli
This will automatically install the panchanga library.
Usage
# Detailed pancanga for a date
panchanga verbose "2025 3 14"
# List 10 consecutive days
panchanga list "2024 1 1"
# Convert Vedic date to Gregorian
panchanga try 1946 0 1 --paksa sukla --year-system saka
# Custom location
panchanga --place mumbai verbose "2025 3 14"
panchanga --latitude 28.6 --longitude 77.2 verbose "2025 3 14"
Commands
panchanga verbose [DATE]
Display detailed panchanga information for a specific date.
Example:
$ panchanga verbose "2025 3 14"
panchanga list [DATE] [DAYS]
List panchanga information for consecutive days.
Example:
$ panchanga list "2024 1 1" 10 # Show 10 days starting from 2024-01-01
panchanga try YEAR MONTH DAY
Convert an Vedic calendar date to Gregorian.
Options:
--paksa: Specify paksha (sukla/krsna)--year-system: Specify year system (saka/vikrama/kali)
Example:
$ panchanga try 1946 0 1 --paksa sukla --year-system saka
panchanga horoscope [DATE] [TIME]
Calculate horoscope/birth chart for a specific date and time.
Example:
$ panchanga horoscope "1990 5 15" "14:30"
Location Options
You can specify location using predefined places or custom coordinates:
Predefined Places:
panchanga --place mumbai verbose "2025 3 14"
panchanga --place delhi verbose "2025 3 14"
panchanga --place bangalore verbose "2025 3 14"
Custom Coordinates:
panchanga --latitude 28.6 --longitude 77.2 verbose "2025 3 14"
Date Format
Dates should be provided as "YEAR MONTH DAY" (space-separated):
"2025 3 14"for March 14, 2025"2024 1 1"for January 1, 2024
Features
- Calculate tithi (lunar day)
- Calculate naksatra (lunar mansion)
- Calculate yoga and karana
- Calculate sunrise time
- Convert between different Vedic calendar eras (Kali, Saka, Vikrama)
- Find samkranti (sun transit) dates
- Generate horoscopes/birth charts
- Support for custom locations
Library Usage
This CLI tool uses the panchanga library. You can use the library directly in your Python code:
import panchanga
# Convert date
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)
# Calculate astronomical positions
tslong = panchanga.get_true_solar_longitude(ahargana)
tllong = panchanga.get_true_lunar_longitude(ahargana)
See the panchanga library documentation for more details.
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_cli-0.1.2.tar.gz.
File metadata
- Download URL: panchanga_cli-0.1.2.tar.gz
- Upload date:
- Size: 19.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 |
8d5bd656070acae6709e66f95f5289bdbf131603468c4c5192ccfb7bae122d44
|
|
| MD5 |
b5168186a068ab7f52206116a7a3f779
|
|
| BLAKE2b-256 |
4f4116bd148cf61bef076064403e0ed1cce997b5db3cd1265ba1b3a17b1e4610
|
File details
Details for the file panchanga_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: panchanga_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.8 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 |
f2d90a5d4361fe5dc852990ff5fc1047ad0def8e38e8524948f83025dddd8335
|
|
| MD5 |
de67203135fbd1ac6cbb9caa6899ea99
|
|
| BLAKE2b-256 |
5a146bf4e71cb905b8a9d32d7503a9f2515e7c977fcf86a4340bd3dbdd620c42
|