Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Pendulum – Python datetimes made easy (eustace.io)
2 points by sdispater on July 5, 2016 | hide | past | favorite | 1 comment


Pendulum is a new library for Python to ease datetimes, timedeltas and timezones manipulation.

It is heavily inspired by Carbon (http://carbon.nesbot.com) for PHP.

Basically, the Pendulum class is a replacement for the native datetime one with some (I hope) useful and intuitive methods and the PendulumInterval class is intended to be a better timedelta class.

An important note about the Pendulum instances is that, unlike the native datetime ones, they are mutable via the appropriate methods.

To those wondering: yes I know Arrow (http://arrow.readthedocs.io) exists but its flaws and strange API (you can throw almost anything at get() and it will do its best to determine what you wanted, for instance) motivated me to start this project.

It’s still fresh so any feedback is appreciated :-).

Link to the official documentation: http://pendulum.eustace.io

Link to the github project: https://github.com/sdispater/pendulum




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: