Pendulum is a Python datetime library that makes working with dates, times, and timezones more intuitive than the standard library.
The standard library's datetime module requires verbose code for common operations and lacks timezone awareness by default. Pendulum solves this by providing a cleaner API while inheriting from the native datetime class, making it a drop-in replacement in most cases. It automatically makes all instances timezone-aware and defaults to UTC. The library handles complex scenarios elegantly, such as normalizing times that don't exist during daylight saving transitions and providing human-readable time differences like "2 minutes ago" or "6 days 23 hours 58 minutes".
Pendulum suits projects that work extensively with timezones, need readable datetime arithmetic, or require robust handling of edge cases around DST transitions. Because it subclasses the standard datetime, it integrates smoothly into existing codebases. However, some database adapters like sqlite3 and MySQLdb use type checking that won't recognize Pendulum instances, requiring manual adapter registration as a workaround. The library targets Python 3.10 and newer.
The project maintains active test coverage through continuous integration and accepts issue reports through its tracker. Development activity shows consistent engagement with the codebase and responsiveness to reported problems.