Panchanga
A basic Hindu calendar and daily Panchanga web app.
Current v1 scope
The current branch provides a daily Panchanga view for a selected date and location, including:
- Tithi and Paksha
- Vara
- Nakshatra
- Yoga
- Karana
- Lunar Masa, including Adhika Masa
- Vikram and Shaka Samvat years
- Sunrise and sunset
- Amanta and Purnimanta calendar conventions
- Browser timezone detection with an Amsterdam fallback
- Previous day, Today, and Next day navigation
- A curated bilingual Hindu festival list (Live/Explore/Tithi same-day badge, plus a browsable Festivals tab with per-year resolved dates)
- Installable/offline-capable PWA assets
Panchanga shows the daily Tithi, Vara, Nakshatra, Yoga, and Karana, along with the lunar month, Samvat years, sunrise, and sunset. Results depend on the selected date, location, timezone, and calendar convention.
Run locally
Install the Pixi environment and start the development server. The task builds
public/ from the package and then serves that deployable artifact:
pixi install
pixi run dev-server
Open http://127.0.0.1:8080/. Do not open index.html with file://; the service worker and offline assets require HTTP or HTTPS.
To serve the deployable PWA artifact instead:
pixi run production-server
Install and use the package
Install the CPython package from PyPI once a release is published:
pip install pancanga
pancanga --date 2026-07-15
pancanga --place "New Delhi" --date 2026-07-15
pancanga --json --date 2026-07-15
The same CLI is available as python -m pancanga. The default output is
human-readable; --json emits the stable machine-readable result contract.
For MicroPython targets, use the generated package.json mip manifest hosted
with the release artifacts or repository:
import mip
mip.install("https://<pages-host>/<project>/package.json")
Use the URL of the deployed public/package.json; its relative module URLs
expect the accompanying pancanga/ directory from the same deployment.
The core engine can then be imported without the CLI, web UI, or location data:
from pancanga import compute_panchanga
PyScript's MicroPython runtime loads the package through its virtual filesystem.
The web build generates pyscript.json with the module map and the service
worker caches the same module graph for offline use:
<script type="mpy" src="app.py" config="pyscript.json"></script>
The canonical package source lives under src/pancanga; browser assets and the
PyScript adapter live under src/pancanga_web.
Verify
Run the complete Python, browser-contract, generated-asset, and reference test suite:
pixi run test-suite
Check generated browser manifests and deployed assets:
pixi run generate-check
# or
python tools/build_manifests.py --check
The Python, browser-contract, generated-asset, MicroPython, Lightpanda, and Firefox offline PWA checks are covered by the Pixi tasks. Full offline browser verification can be run with:
pixi run pwa-e2e-firefox
CI and GitLab Pages
The GitLab pipeline runs the test/compile/generated-manifest checks and a real
Firefox offline PWA test. On master, the Pages job runs pixi run build-web,
validates the generated public/ artifact, and publishes it to GitLab Pages.
The deployed URL is available under Deploy → Pages.
The Pages artifact contains the web app, pyscript.json, package.json, and
the cached pancanga/ module tree. The package.json can therefore be used as
the mip manifest for MicroPython deployments.
PyPI publication is a separate manual, tag-triggered CI job. It uses uv build
and uv publish with the masked UV_PUBLISH_TOKEN variable; it does not run
as part of the Pages deployment.
Calculation notes
The browser loads the portable calculation engine as ordinary Python modules through PyScript's files configuration. The service worker caches the module graph for offline use. Daily values are evaluated at local sunrise for the selected coordinates. The app currently uses the Lahiri ayanamsa and supports the generated timezone data documented in docs/pwa-deployment.md.
Calendar results can vary by location, timezone, and calendar convention. This is a basic calendar release, not a complete regional festival or Muhurta calendar.
v1 release boundary
Included in the basic release:
- Daily Panchanga calculation and display
- Date and location selection
- Local sunrise and sunset
- Amanta/Purnimanta selection
- Karana display
- Curated bilingual festival list (same-day badge and a per-year Festivals tab)
- PWA/offline packaging
Deferred to a later release:
- Monthly calendar grid/navigation
- Ekadashi as a recurring rule, deferred-month lookup for Adhika-suppressed festivals, and expanding the curated festival list beyond its current 9-entry seed set
- Muhurta, Choghadiya, and Rahu Kalam
- Additional regional calendar conventions
- Notifications, accounts, and native mobile apps
See docs/release-notes.md for the current branch release summary and remaining release-readiness work.
Metadata
Release files for pancanga 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| pancanga-0.1.0.tar.gz | 434.0 kB | Without provenance | Details for pancanga-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pancanga-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pancanga-0.1.0-py3-none-any.whl |
Total release size: 796.7 kB
Release files / pancanga-0.1.0.tar.gz
| Download URL | pancanga-0.1.0.tar.gz |
|---|---|
| Size | 434.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c82b7d1eea80c9ed80d18bb2e9c76a16012030b4948ebe014c1d79577c323f6
|
|
BLAKE2b-256 checksum How to use checksums |
7f64b1b90ce9463719e9b98c66c85aaccb16f149a624a38d4dbd5df6edaa88a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / pancanga-0.1.0-py3-none-any.whl
| Download URL | pancanga-0.1.0-py3-none-any.whl |
|---|---|
| Size | 362.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aca465d8ba718dab116d088d1b2e6db4bebe1b8953a9856e8099553349539e53
|
|
BLAKE2b-256 checksum How to use checksums |
44ad53883780c04ee6a92f2aa883b8e98593a6db5814371ef09f12de91b664e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for pancanga 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.