Skip to content

vrachieru/astral

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Version Version
Calculate things that happen beyond the clouds

Install

$ pip3 install git+https://github.com/vrachieru/astral.git

or

$ git clone https://github.com/vrachieru/astral.git
$ pip3 install ./astral

Usage

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))

Acknowledgements

Calculations are based on http://aa.quae.nl/en/reken/zonpositie.html formulas.

License

MIT