Comparing
Drop-in datetime replacement with first-class timezone support, DST awareness, and intuitive arithmetic.
pytest: simple powerful testing with Python
| Metric | pendulum | pytest |
|---|---|---|
| Ecosystem | Python | Python |
| Difficulty | Beginner | Beginner |
| Weekly downloads | 2.0M↑ | 0 |
| Latest version | v3.0.0 | v9.0.2 |
| Recipes | 1 | 1 |
pendulum only
Shared
pytest only
Scheduling apps, calendar features, time-series data across timezones, any app where DST bugs would be costly.
Use pytest for any Python project with tests. It's the de facto standard — most libraries, frameworks, and CI pipelines assume pytest. Its plugin ecosystem covers everything from coverage (pytest-cov) to async tests (pytest-asyncio) to parameterisation.
Simple UTC-only timestamps where datetime.now(timezone.utc) is sufficient. pendulum is heavier than stdlib.
For extremely simple one-off scripts where adding a dependency feels heavy, unittest is built into Python. For property-based testing, add Hypothesis on top of pytest rather than replacing it.
pendulum
pytest