$npx skillfedfor your agent

suntimes

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.

With conditionsPyPI Scientific/EngineeringReleased Jul 2022227.9K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — suntimes-1.1.2-py3-none-any.whl
v1.1.2 · released 2022-07-01 · Python >=3.6 · 3 runtime deps: pytz, tzlocal, jdcal

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.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with three stable runtime dependencies (pytz, tzlocal, jdcal).
  • However, the package is abandoned—last commit was 2023-02-08 and no updates since July 2022.
  • No active maintenance means bug fixes or compatibility updates are unlikely.

License · maintenance · safety

permissive license (permissive) — MIT License permits unrestricted use, modification, and distribution with minimal restrictions. You may use this package freely in commercial and private projects, provided you retain the copyright notice and license text.

last release 2022-07-01 (1505 days) · last repo commit 2023-02-08 · 7 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 227,889 downloads/mo, #9,163 on PyPI

Verify before relying

from datetime import datetime
from suntimes import SunTimes

day = datetime(2021, 1, 6)
sun = SunTimes(2.349902, 48.852968, 35)  # longitude, latitude, altitude
rise = sun.riseutc(day)  # datetime(2021, 1, 6, 7, 43)
set_time = sun.setutc(day)  # datetime(2021, 1, 6, 16, 12)
  • Accuracy degradation near polar regions—fact sheet notes 'the closer you get to the poles, the lower the accuracy' but does not quantify the error margin.
  • Whether calculations remain valid for dates far in the past or future, or only near the present era.
  • Compatibility with Python versions beyond 3.6 in practice, given the package is abandoned.
Same gist for agents: .md · .json

What it is and 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.

The 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—the last commit was in February 2023 and no updates have been released since July 2022.

Use it for

  • 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.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

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.

Install

suntimes on PyPI

Before you install

Low install friction with three stable runtime dependencies (pytz, tzlocal, jdcal). However, the package is abandoned—last commit was 2023-02-08 and no updates since July 2022. No active maintenance means bug fixes or compatibility updates are unlikely.

License in practice

MIT License permits unrestricted use, modification, and distribution with minimal restrictions. You may use this package freely in commercial and private projects, provided you retain the copyright notice and license text.

Quickstart

from datetime import datetime
from suntimes import SunTimes

day = datetime(2021, 1, 6)
sun = SunTimes(2.349902, 48.852968, 35)  # longitude, latitude, altitude
rise = sun.riseutc(day)  # datetime(2021, 1, 6, 7, 43)
set_time = sun.setutc(day)  # datetime(2021, 1, 6, 16, 12)

Verify before relying

  • Accuracy degradation near polar regions—fact sheet notes 'the closer you get to the poles, the lower the accuracy' but does not quantify the error margin.
  • Whether calculations remain valid for dates far in the past or future, or only near the present era.
  • Compatibility with Python versions beyond 3.6 in practice, given the package is abandoned.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.6
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
pytztzlocaljdcal
MaintenanceAbandoned 1,505 days since the last release
Last repo commit
First released
Downloads227,889 / month, #9,163 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Evidence: suntimes-1.1.2-py3-none-any.whl

Tags

Capabilities
sunrise sunset time calculationsolar time by locationdawn dusk times coordinatespolar day polar night detectionsun position astronomy pythondaylight duration calculatorsolar ephemeris library
Topics
astronomysolar-timegeolocation
PyPI keywords
sunsunsetsunrisepython

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “solar time by location”

  • suntimesCalculates sunrise and sunset times for any geographic location…
  • suntimeCalculates sunrise and sunset times for any geographic location and…
  • PyMeeusPyMeeus implements astronomical algorithms from Jean Meeus's…

Give your agent the search over MCP, or paste the wish link into any chat.

More Scientific/Engineering packages

numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
pandas Worth it
PyPI · Scientific/Engineering · released Jul 2026

pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.

BSD-3-Clausecompiled wheel · 3.11+
769.1Mdownloads / mo
scipy Worth it
PyPI · Libraries · released Jun 2026

scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.

BSD-3-Clausecompiled wheel · 3.12+
449.0Mdownloads / mo
scikit-learn Worth it
PyPI · Software Development · released Jun 2026

scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.

Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.

BSD-3-Clausecompiled wheel · 3.11+
235.5Mdownloads / mo
dill Worth it
PyPI · Software Development · released Jan 2026

dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.

BSD-3-Clausepure Python · 3.9+
208.1Mdownloads / mo
multiprocess Worth it
PyPI · Software Development · released Jan 2026

Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.

Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.

BSD-3-Clausepure Python · 3.9+
202.7Mdownloads / mo

See also suntime · pytz · business-duration · kerykeion · lat-lon-parser · tzfpy · pendulum · pygeodesy · backports.zoneinfo · businesstimedelta