{"categories":[{"label":"Scientific/Engineering","url":"https://skillfed.io/packages/category/scientific-engineering/5"}],"enrichment":{"capability":"Calculates sunrise and sunset times for any geographic location (longitude, latitude, altitude) on a given date, handling polar regions where day/night calculations differ.","skillfed_tags":["astronomy","solar-time","geolocation"],"use_cases":["Schedule outdoor activities or events by retrieving sunrise/sunset times for a specific location and date.","Generate annual solar timetables for a location in JSON or CSV format for reporting or spreadsheet analysis.","Calculate day length (duration of daylight) for a location to inform energy consumption or agricultural planning.","Detect and handle polar day/polar night conditions in high-latitude applications.","Build solar energy or astronomy tools that need accurate sun position times across multiple timezones."],"what_it_does":"SunTimes is a Python library that computes sunrise and sunset times for a given geographic location and date. You provide longitude, latitude, and optional altitude, then call methods to retrieve times in UTC, local computer time, or any specified timezone. The library handles edge cases like polar day and polar night, returning special indicators when the sun does not rise or set. It also offers convenience methods to extract just the hour and minute, calculate day length, and generate annual timetables as JSON or CSV files.\n\nThe package relies on astronomical calculations based on the sunrise equation (from Wikipedia) and uses pytz, tzlocal, and jdcal for timezone and calendar math. Calculations are accurate to within one to several minutes. The library is straightforward to use for applications like solar energy planning, outdoor activity scheduling, or astronomy tools, but it is no longer maintained\u2014the last commit was in February 2023 and no updates have been released since July 2022.","worth_installing":"Yes, if you need straightforward sunrise/sunset calculations and can accept that the package is no longer maintained. The code is stable, has no known vulnerabilities, and the three dependencies are well-established. Install it for one-off scripts or prototypes; for production systems where you may need bug fixes or Python version updates, consider whether an actively maintained alternative is available or whether you can fork and maintain it yourself."},"id":"suntimes","links":{"html":"https://skillfed.io/packages/suntimes","md":"https://skillfed.io/packages/suntimes.md","pypi":"https://pypi.org/project/suntimes/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2022-07-01","license_spdx":null,"license_treatment":"permissive","name":"suntimes","python_support":"supports_current","summary":"For a given place (longitude, latitude and altitude) and a given day, returns the time of sunrise and the time of sunset (in UTC and in local time). Create and save a json or csv file with the timetables for a whole year. Calculations valid beyond the polar circles; returns Polar Day or Polar Night if needed."},"popularity":{"monthly_downloads":227889,"position":9163,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.1.2"}
