Pendulum

Python datetime library that makes working with dates, times, and timezones easy and correct. Pendulum provides a drop-in replacement for Python's datetime with immutable objects, DST-aware timezone handling, natural language period parsing, and human-readable duration strings (2 hours ago, in 3 days). Addresses the many pitfalls of the standard datetime module.

Evaluated Mar 06, 2026 (0d ago) v3.0+
Homepage ↗ Repo ↗ Developer Tools python datetime timezone parsing duration human-readable DST
⚙ Agent Friendliness
68
/ 100
Can an agent use this?
🔒 Security
98
/ 100
Is it safe for agents?
⚡ Reliability
88
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
85
Error Messages
82
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
100
Auth Strength
100
Scope Granularity
100
Dep. Hygiene
90
Secret Handling
100

Local library with no network access. Timezone data bundled. No security concerns.

⚡ Reliability

Uptime/SLA
100
Version Stability
85
Breaking Changes
80
Error Recovery
88
AF Security Reliability

Best When

Your Python agent needs reliable timezone-aware datetime handling, human-readable durations, or parsing diverse date formats without DST bugs.

Avoid When

You only need basic datetime operations without timezone complexity — standard datetime or dateutil is simpler.

Use Cases

  • Parse and manipulate dates in agent pipelines with correct timezone handling and DST transitions
  • Generate human-readable relative time strings ('3 hours ago', 'in 2 days') for agent output and notifications
  • Perform date arithmetic in agent scheduling logic (add 2 business days, find next Monday, etc.)
  • Parse diverse date string formats from external APIs reliably without manual strptime format strings
  • Handle timezone-aware scheduling in multi-timezone agent workflows with correct DST transitions

Not For

  • Simple datetime operations — Python's standard datetime is sufficient if you don't need timezone complexity
  • High-frequency datetime parsing in tight loops — arrow or dateutil may be faster for simple use cases
  • Environments where dependency size matters — pendulum includes timezone data

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Local Python library — no authentication.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

Completely free and open source.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • Pendulum 3.x (Rust-powered) has some breaking API changes from 2.x — check migration guide when upgrading
  • pendulum.now() uses the local system timezone by default — always pass timezone explicitly for deterministic agent behavior
  • Period and Duration are different types — Period is between two datetimes (calendar-aware), Duration is absolute; mixing them causes unexpected results
  • pendulum.parse() is permissive by default — ambiguous strings like '01/02/03' will be parsed without error but may be wrong date
  • Pendulum's diff() returns Period objects, not timedelta — code that expects timedelta.days will break; use .in_days() or .total_seconds() methods
  • Serialization to JSON requires converting to ISO string or timestamp — pendulum.DateTime is not directly JSON serializable; use .isoformat() or .int_timestamp

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Pendulum.

$99

Scores are editorial opinions as of 2026-03-06.

5208
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered