Pythonarrowv1.3.0
PythonBeginner-friendly

arrow

Better dates and times in Python — timezone-aware by default, human-friendly API, and natural language parsing.

datetimetimezoneparsingutilities
The Problem

Python's datetime module is powerful but verbose and error-prone — especially with timezones, parsing, and humanizing. Getting 'now in UTC' requires three lines; parsing 'next Monday' is not built-in at all.

Mental Model

Arrow wraps Python datetime into a single object that's always timezone-aware. You use arrow.now() instead of datetime.now(timezone.utc). Shifting time uses .shift(hours=+3). Converting to string is .format() or .humanize() ('3 hours ago').

60-second start

Common date operations

import arrow

now = arrow.now('UTC')           # 2024-01-15T10:30:00+00:00
now_local = arrow.now('US/Eastern')  # auto timezone-aware

past = now.shift(days=-7)        # one week ago
future = now.shift(months=+2, days=+3)

print(now.format('YYYY-MM-DD HH:mm:ss ZZ'))
print(past.humanize())           # 'a week ago'
print(future.humanize())         # 'in 2 months'
dt = arrow.get('2024-01-15 10:30', 'YYYY-MM-DD HH:mm')
utc = dt.to('UTC')
new_york = dt.to('America/New_York')
tokyo = dt.to('Asia/Tokyo')
print(new_york.format(), '→', tokyo.format())

Use it when

Any application dealing with dates across timezones, relative time displays ('posted 2 days ago'), date parsing from strings, date range iteration, or when you want less boilerplate than stdlib datetime.

Skip it when

High-frequency numerical date computations (use numpy datetime64 or pandas Timestamp which are faster). Arrow adds overhead per operation.

Alternatives
pendulumSimilar API but stricter, better DST handling
dateutilPowerful parsing and relative dates, stdlib-compatible
datetimeZero dependency, fine for simple UTC-only work

Ready to explore the full API?

See every class, function, and relationship in an interactive graph.