Python port (in progress) of the Turbo Pascal Pohualli calendrical utility
Project description
Pohualli (Python Port)
Work-in-progress Python reimplementation of the original Turbo Pascal Pohualli calendar utility.
Goals
- Faithful translation of core calendrical calculations (Maya & Aztec systems)
- 819-day cycle, planetary synodic values, year bearer computation
- Configurable New Era and correction parameters
- Composite API producing structured results
- Config persistence (save/load JSON)
- Clear, testable Python modules separated from any UI
- Modern packaging & minimal dependencies
Structure
pohualli/
__init__.py
autocorr.py # Auto-derivation of correction offsets
aztec.py # Aztec-specific name tables & conversions
calendar_dates.py # Gregorian / Julian conversion helpers
cli.py # Command-line interface entry point
composite.py # High-level composite computation
correlations.py # Correlation preset management
cycle819.py # 819-day cycle station & value
maya.py # Core Tzolk'in / Haab / Long Count logic
moon.py # Moon age & eclipse heuristic
planets.py # Planet synodic computations
templates/ # Web UI Jinja2 templates
types.py # Dataclasses for config & corrections
webapp.py # FastAPI application
yearbear.py # Year bearer packing/unpacking
zodiac.py # Star & earth zodiac logic
tests/
test_autocorr.py
test_calendar_parity.py
test_composite.py
test_cycle_planets.py
test_maya.py
test_moon_zodiac.py
test_web.py
test_yearbear_cli.py
docs/ # MkDocs documentation sources
mkdocs.yml # MkDocs configuration
Dockerfile
docker-compose.yml
pyproject.toml
LICENSE
README.md
Composite Usage (Python)
from pohualli import compute_composite
res = compute_composite(2451545)
print(res.tzolkin_name, res.long_count, res.star_zodiac_name)
CLI Examples
# Human-readable
pohualli from-jdn 2451545 --year-bearer-ref 0 0
# JSON output
pohualli from-jdn 2451545 --json > result.json
# Override New Era
pohualli from-jdn 2451545 --new-era 584285 --json
# Save & load config
pohualli save-config config.json
pohualli load-config config.json
Tests
python -m pytest -q
Web UI
Install web extras and run development server:
python -m pip install -e .[web]
uvicorn pohualli.webapp:app --reload
Open http://127.0.0.1:8000 in a browser.
Documentation
Published docs (main branch): https://muscariello.github.io/pohualli-python/
Docker
Build locally:
docker build -t pohualli .
docker run --rm -p 8000:8000 pohualli
Pre-built Images (GitHub Container Registry)
Multi-architecture images (linux/amd64, linux/arm64) are published automatically from main and version tags via GitHub Actions.
Pull latest:
docker pull ghcr.io/muscariello/pohualli-python:latest
Run:
docker run --rm -p 8000:8000 ghcr.io/muscariello/pohualli-python:latest
Use a specific version tag:
docker pull ghcr.io/muscariello/pohualli-python:v1.2.3
References
- Sołtysiak, Arkadiusz & Lebeuf, Arnold. (2011). Pohualli 1.01. A computer simulation of Mesoamerican calendar systems. 8(49), 165–168.
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
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 pohualli-0.2.2.tar.gz.
File metadata
- Download URL: pohualli-0.2.2.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2318956d84dba62c897f3b9392fef17fcd05b1184dce53542fb38f724d65ef95
|
|
| MD5 |
408f82c18f61b1073bf2c2901dc122fd
|
|
| BLAKE2b-256 |
fdb91165a136684c4ecedd8a7f70c05042c13477bb725f04e41ac03389c87d26
|
File details
Details for the file pohualli-0.2.2-py3-none-any.whl.
File metadata
- Download URL: pohualli-0.2.2-py3-none-any.whl
- Upload date:
- Size: 31.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82969d78d9a72709aa081b279b335b399052101f52e85aaf5b9870fc1905890e
|
|
| MD5 |
6226e058361b1c2998e4b3a594faccbe
|
|
| BLAKE2b-256 |
5ee02aba583f1eb2de6ba116bff924d019fe8f690283a23b8c42b7c40d234d32
|