drik-panchanga
Observational Indian lunisolar calendar (Hindu Drig-ganita / Drik Panchanga) using the Swiss Ephemeris.
This PyPI package installs the core library module panchanga.py, plus the
PDF calendar generators behind the [pdf] extra:
pip install drik-panchanga # core library only
pip install "drik-panchanga[pdf]" # + reportlab, PDF console scripts
With the [pdf] extra, two console commands are available:
drik-panchanga-short— one-page A4 landscape panchanga for 14 monthsdrik-panchanga-long— 12-page A4 portrait wall calendar
drik-panchanga-short --city "Bengaluru, IN" --start 2026-06
Ephemeris data
Swiss Ephemeris needs .se1 data files. Either set SE_EPHE_PATH to a
directory that contains them, or place them in the default location used by
this library:
- Linux / macOS:
~/.local/share/swisseph(or$XDG_DATA_HOME/swisseph) - Windows:
%LOCALAPPDATA%\swisseph
Usage
import panchanga
panchanga.set_chosen_ayanamsa("citra")
place = panchanga.Place(12.972, 77.594, +5.5) # lat, lon, timezone hours
jd = panchanga.gregorian_to_jd(panchanga.Date(2026, 1, 15))
print(panchanga.tithi(jd, place))
print(panchanga.nakshatra(jd, place))
print(panchanga.masa(jd, place, amanta=True)) # or amanta=False for pūrṇimānta
For tropical (sāyana) values instead of sidereal, call
set_coordinate_mode("tropical") before computing; reset with
set_coordinate_mode("sidereal"):
panchanga.set_coordinate_mode("tropical")
print(panchanga.tithi(jd, place)) # tithi from tropical longitudes
print(panchanga.masa(jd, place, amanta=True))
panchanga.set_coordinate_mode("sidereal")
Full source, GUI, festival rules, and PDF calendar live in the GitHub repository.
License
GNU Affero General Public License v3 or later (AGPL-3.0-or-later).
Metadata
Release files for drik-panchanga 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| drik_panchanga-1.0.0.tar.gz | 545.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| drik_panchanga-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / drik_panchanga-1.0.0.tar.gz
| Download URL | drik_panchanga-1.0.0.tar.gz |
|---|---|
| Size | 545.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b764e868ad22c5f05da30bf1f945921b117431fe43dff524559e746855bdf0bf
|
|
BLAKE2b-256 checksum How to use checksums |
6150ff141edf5032c556f3b42356360bff38564b751712daccaf0a26b6650a9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Release files / drik_panchanga-1.0.0-py3-none-any.whl
| Download URL | drik_panchanga-1.0.0-py3-none-any.whl |
|---|---|
| Size | 548.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
775658e75502c81b0c38f9901036c9358ac50f71c19414cbf501141546933eda
|
|
BLAKE2b-256 checksum How to use checksums |
45f54a12bb3fe427d1dc552291f9dccab4f0d3364b94a1276fcf6eaa2259732f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|