Python API¶
Primary entry point:
compute_composite(jdn: int) -> CompositeResult
Example:
from pohualli import compute_composite
res = compute_composite(2451545)
print(res.tzolkin_value, res.tzolkin_name, res.long_count)
CompositeResult includes (selected):
tzolkin_value,tzolkin_namehaab_day,haab_month_namelong_countyear_bearer_value,year_bearer_namecycle819_station,dir_color_str- planetary indices (
mercury_index,venus_index, etc.) maya_moon_age,eclipse_possiblestar_zodiac_deg,star_zodiac_name
Configuration objects are in pohualli.types (for example DEFAULT_CONFIG).
JSON-RPC Backend API¶
The Flutter desktop app communicates with the backend via newline-delimited JSON-RPC over stdin/stdout.
Start backend:
pohualli-rpc
Supported methods:
healthlist_correlationsconvertderive_autocorrsearch_rangequit
Example request lines:
{"jsonrpc":"2.0","id":1,"method":"health","params":{}}
{"jsonrpc":"2.0","id":2,"method":"convert","params":{"jdn":2451545,"culture":"maya"}}