Calculate things that happen beyond the clouds
$ pip3 install git+https://github.com/vrachieru/astral.git
or
$ git clone https://github.com/vrachieru/astral.git
$ pip3 install ./astral
from datetime import datetime
from astral import Sun
sun = Sun()
sun_times = sun.get_event_times(datetime.now(), 47.16222, 27.58889)
for event, time in sun_times.items():
print('%s: %s' % (event, time))
Calculations are based on http://aa.quae.nl/en/reken/zonpositie.html formulas.
MIT