BSD Ports

devel/py-pendulum 3.0.0 DragonFly

Python package to ease datetimes manipulation

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
MIT
Categories
devel, python
Package size
271.4 KiB, 1542.5 KiB installed

Description

Native datetime instances are enough for basic cases but when you face more complex use-cases they often show limitations and are not so intuitive to work with. Pendulum provides a cleaner and more easy to use API while still relying on the standard library. So it's still datetime but better.

Unlike other datetime libraries for Python, Pendulum is a drop-in replacement for the standard datetime class (it inherits from it), so, basically, you can replace all your datetime instances by DateTime instances in your code (exceptions exist for libraries that check the type of the objects by using the type function like sqlite3 or PyMySQL for instance).

It also removes the notion of naive datetimes: each Pendulum instance is timezone-aware and by default in UTC for ease of use.

Pendulum also improves the standard timedelta class by providing more intuitive methods and properties.

In the other systems

SystemPortVersion
DragonFlydevel/py-pendulum3.0.0
FreeBSDdevel/py-pendulum3.2.0_6
MidnightBSDdevel/py-pendulum2.1.1_1
HardenedBSDdevel/py-pendulum3.2.0_5
GhostBSDdevel/py-pendulum3.2.0_5

Install

Binary package:

pkg install py311-pendulum

From DPorts:

cd /usr/dports/devel/py-pendulum && make install clean

Dependencies

Run dependencies 4