Skip to main content

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.

Release files for panchanga-cli 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-cli 0.1.2
File Size Uploaded
panchanga_cli-0.1.2.tar.gz 19.6 kB Details

Built distribution (wheel)

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

Total release size: 30.4 kB

Release files / panchanga_cli-0.1.2.tar.gz

Download URL panchanga_cli-0.1.2.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8d5bd656070acae6709e66f95f5289bdbf131603468c4c5192ccfb7bae122d44
BLAKE2b-256 checksum
How to use checksums
4f4116bd148cf61bef076064403e0ed1cce997b5db3cd1265ba1b3a17b1e4610
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

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

Download URL panchanga_cli-0.1.2-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2d90a5d4361fe5dc852990ff5fc1047ad0def8e38e8524948f83025dddd8335
BLAKE2b-256 checksum
How to use checksums
5a146bf4e71cb905b8a9d32d7503a9f2515e7c977fcf86a4340bd3dbdd620c42
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