When planning another project (hackaday.io project 199353 Magnificent Moon-o-Meter) I thought it would be good to work out the technical details in Python first, since I had never worked with json data before and hardly ever used a web API to retrieve data.
Files
SunMoonClock_v10.py
Python script to retrieve json Sun and Moon information from the US Naval Observatory API, parse the json and print out sunrise, moonrise, sunset, moonset, nearest moon phase and what day of the moon cycle we are in.