Skip to content

Sunsetter is a simple python web app running on GCP that can calculate, given a point of view and a point of interest (selected on a google map) on which day of the year the sun will rise or set in this direction.

Notifications You must be signed in to change notification settings

w00kie/sunsetter

Repository files navigation

Actions Status Coverage Status

What is this?

Sunsetter is a simple python web app that can calculate, given a point of view and a point of interest (selected on a google map) on which day of the year the sun will rise or set in this direction. More info on my blog.

It is based on the brilliant pysolar library for the hardcore astronomical calculations. It also uses spin.js for a cool Ajax spinner without any GIF.

It's currently setup to self deploy and run on Google Cloud Run with Github Actions CI/CD.

Note: the app is configured to predict when the sun's lower limb touches the horizon, not the civil sunset when the sun completely disappears behind the horizon, as this makes for a better picture. This setting can be modified app-wide in sunazymuth.py.

How to run it on my machine?

If you want to download it and run it on your own machine you can just run docker-compose up to run it on http://localhost:8000 with a redis instance. You'll need a Google Maps API key enabled for localhost though.

About

Sunsetter is a simple python web app running on GCP that can calculate, given a point of view and a point of interest (selected on a google map) on which day of the year the sun will rise or set in this direction.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published