skillfed

pendulum

Python datetimes made easy

pendulum Permissive license MIT License Active 6,671 v3.2.0 released

Install

pendulum on PyPI

pip

pip install pendulum

uv

uv add pendulum

poetry

poetry add pendulum

Package facts

License MIT License (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 2 — python-dateutil, tzdata
Maintenance actively maintained — 195 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: pendulum-3.2.0-py3-none-any.whl

Keywords: datetime, date, time

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

About pendulum

from the package's own PyPI description — quoted content, verbatim

Pendulum

.. image:: https://img.shields.io/pypi/v/pendulum.svg :target: https://pypi.python.org/pypi/pendulum

.. image:: https://img.shields.io/pypi/l/pendulum.svg :target: https://pypi.python.org/pypi/pendulum

.. image:: https://github.com/sdispater/pendulum/actions/workflows/tests.yml/badge.svg :alt: Pendulum Build status :target: https://github.com/sdispater/pendulum/actions

Python datetimes made easy.

Supports Python 3.9 and newer.

.. code-block:: python

>>> import pendulum

>>> now_in_paris = pendulum.now('Europe/Paris') >>> now_in_paris '2016-07-04T00:49:58.502116+02:00'

# Seamless timezone switching >>> now_in_paris.in_timezone('UTC') '2016-07-03T22:49:58.502116+00:00'

>>> tomorrow = pendulum.now().add(days=1) >>> last_week = pendulum.now().subtract(weeks=1)

>>> past = pendulum.now().subtract(minutes=2) >>> past.diff_for_humans() '2 minutes ago'

>>> delta = past - last_week >>> delta.hours 23 >>> delta.in_words(locale='en') '6 days 23 hours 58 minutes'

# Proper handling of datetime normalization >>> pendulum.datetime(2013, 3, 31, 2, 30, tz='Europe/Paris')...

Read as markdown · JSON record · Source repository · Homepage · Docs

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Pendulum provides an intuitive, timezone-aware datetime API that extends Python's standard library with cleaner methods for timezone handling, date arithmetic, and human-readable time differences.

Low friction installation with only two lightweight runtime dependencies (python-dateutil and tzdata). The project is actively maintained with recent releases, indicating stable, well-tested code.

MIT License permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.

Usage

pip install pendulum
import pendulum
now_in_paris = pendulum.now('Europe/Paris')
utc_time = now_in_paris.in_timezone('UTC')
print(now_in_paris.diff_for_humans())

Requires Python 3.9 or newer. Type-checking libraries like sqlite3 and PyMySQL may require adapter registration since Pendulum's DateTime is a subclass, not the native datetime type.

Verdict: Pendulum is a mature, actively maintained datetime library with minimal dependencies and no known vulnerabilities. It's a drop-in replacement for Python's datetime that significantly improves usability for timezone-aware operations and date arithmetic, though some database libraries require adapter registration.

Needs verification

  • Whether the package's datetime subclassing approach causes issues with specific ORM frameworks beyond the documented sqlite3/PyMySQL cases
  • Performance characteristics compared to standard library datetime for high-volume operations
  • Community adoption metrics beyond maintenance status
timezone aware datetimepython datetime wrappereasy date arithmetichuman readable time differencestimezone conversiondatetime utilitiespendulum datetime

Similar packages