Download raw body.
NEW: astro/py-ephem
On Mon, Jun 09, 2025 at 11:45:15AM +0100, Stuart Henderson wrote: > On 2025/06/09 11:44, Stuart Henderson wrote: > > On 2025/06/09 10:37, Stuart Henderson wrote: > > > On 2025/06/09 09:21, Mikolaj Kucharski wrote: > > > > Hi. > > > > > > > > I needed to get info about sunrise and sunset. I am aware of py3-astral > > > > but wanted to compare both, ephem and astral. > > > > > > Given the warnings on https://rhodesmill.org/pyephem/, I'm wondering > > > if this is really a good idea to import unless there's some other > > > software intended to be ported that needs it? Skyfield (largely > > > from the same author and more actively developed) generally seems > > > a better idea, for sunrise and sunset calcs see e.g. > > > https://techoverflow.net/2022/06/19/how-to-compute-sunrise-sunset-in-python-using-skyfield/ > > > > > > If it is still worthwhile, here's a slightly tweaked version. > > > > > > > If it's of interest, here are a few ports for a cli tool providing a > > simple interface to display rise and set times for sun, moon, planets > > and a former planet, using skyfield as the backend. > > oh, and here's sample output for that: > > $ kosmorro > Monday, June 9, 2025 > > Object Rise time Culmination time Set time > -------- ----------- ------------------ ---------- > Sun 4:01 AM 12:12 PM 8:24 PM > Moon 7:17 PM 11:00 PM 2:18 AM > Mercury 4:36 AM 1:06 PM 9:36 PM > Venus 2:12 AM 9:09 AM 4:05 PM > Mars 9:36 AM 4:54 PM 12:14 AM > Jupiter 4:47 AM 1:00 PM 9:13 PM > Saturn 1:12 AM 7:09 AM 1:05 PM > Uranus 2:58 AM 10:46 AM 6:35 PM > Neptune 1:09 AM 7:11 AM 1:13 PM > Pluto 11:24 PM 3:29 AM 7:30 AM > > Moon phase: Waxing Gibbous > Full Moon on Wednesday, June 11, 2025 at 7:43 AM > > Note: All the hours are given in UTC. > This looks very useful. I am building it at the moment and dependency tree takes a while, but the new ports read fine. It would be useful to me to have it in the tree. The practical side of the command line is exactly what I need. However I also need a module, so I can incorporate it in my local code. -- Regards, Mikolaj
NEW: astro/py-ephem