--- id: pendulum version: "3.2.0" license: MIT License license_treatment: permissive maintenance: active --- # pendulum — Python datetimes made easy License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install pendulum uv add pendulum poetry add pendulum ## Description 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')... ## AI interpretation — verify before relying 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. 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. [View on SkillFed](https://skillfed.io/packages/pendulum) · [View on PyPI](https://pypi.org/project/pendulum/)