Skip to main content

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


Download files

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

Source Distribution

panchanga_cli-0.1.0.tar.gz (19.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_cli-0.1.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for panchanga_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2f8481d0f29a4ae39bff0ca5d5a31d7fc7bcd4507b3c21310a582e649bbb1581
MD5 061e8b7bd20da0a87d0f327c5f1c414c
BLAKE2b-256 fbcc315b46af9e9e0435b327a4297ecea8fa83bfcc5e0e4011754a33a3d59f66

See more details on using hashes here.

File details

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

File metadata

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

Hashes for panchanga_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43d37b527ea53834b42f3cdb7c6b74f3fa10f679dbfb7efae5fe14f5be200c13
MD5 45635e9bb1dbc8f45c0b5c73b17f075b
BLAKE2b-256 2c97c8f035ce5dca0c561420c60a7bbf9be3c855527f6e6b6e7d0ef031ef38f8

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