maya
Datetimes for Humans.
What it is and what it does
Maya is a datetime library built around the practical headaches of parsing and manipulating dates from websites and calendar events. It wraps timezone-aware datetime handling with a human-centric API, letting you parse natural language like 'tomorrow' or '2011-02-07', convert between ISO 8601, RFC 2822, and RFC 3339 formats, and perform timezone algebra that behaves identically across all machines regardless of system locale.
The library includes a MayaDT class for individual timestamps and a MayaInterval class for time ranges, supporting operations like adding days, snapping to calendar boundaries, and generating human-readable output ('23 hours from now'). It depends on humanize, pytz, dateparser, tzlocal, pendulum, and snaptime to handle the complexity of timezone conversions, locale-aware formatting, and flexible date parsing.
Use it for:
- Parse scraped datetime strings from websites and normalize them to a consistent timezone for storage or comparison.
- Generate human-readable time deltas ('an hour ago', 'tomorrow') for user-facing interfaces without manual formatting.
- Perform calendar calculations on events with start and end times, comparing overlaps or generating time intervals.
- Convert between multiple datetime formats (ISO 8601, RFC 2822, RFC 3339) for API responses or data interchange.
- Handle timezone-aware datetime arithmetic that produces identical results across systems with different locale settings.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Maya provides a human-friendly API for parsing, formatting, and manipulating datetimes with automatic timezone handling, supporting natural language input like 'tomorrow' and output in ISO 8601, RFC 2822, and RFC 3339 formats.
Yes, if you are working with web scraping or calendar events and need reliable timezone handling and natural language parsing. The package is stable and production-ready, but be aware it has been dormant since January 2019 with no recent updates—verify compatibility with your Python version and check whether its dependencies have introduced breaking changes before adopting it in new projects.
Install
maya on PyPI
pip
pip install mayauv
uv add mayapoetry
poetry add mayaInstalling maya
Before you install
Installation is straightforward with low friction; the package is stable and production-ready but dormant, with the last release in January 2019 and no updates since then despite an active repository.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for most commercial and open-source projects.
Quickstart
import maya
# Parse natural language
tomorrow = maya.when('tomorrow')
print(tomorrow.slang_time()) # '23 hours from now'
# Parse scraped datetime string
scraped = '2016-12-16 18:23:45.423992+00:00'
dt = maya.parse(scraped).datetime(to_timezone='US/Eastern', naive=True)
print(dt) # datetime.datetime(2016, 12, 16, 13, 23, 45, 423992)
Verify before relying
- Whether the package remains compatible with modern Python versions beyond 3.6, given the 2019 release date.
- Performance characteristics when parsing large volumes of datetime strings or handling complex timezone calculations.
- Whether pendulum, dateparser, and other runtime dependencies have introduced breaking changes since Maya's last release.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — humanize, pytz, dateparser, tzlocal, pendulum, snaptime |
| Maintenance | dormant — 2,777 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 175,051/month — #10,272 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: maya-0.6.1-py2.py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
arrowArrow provides a simpler, more intuitive API…
permissive · top 1,000 on PyPI
parsedatetimeParses human-readable date and time strings…
permissive · top 1,000 on PyPI
pendulumPendulum provides an enhanced datetime API for…
permissive · top 1,000 on PyPI
deloreanDelorean simplifies Python datetime…
permissive · top 15,000 on PyPI
aniso8601Parses ISO 8601 date, time, datetime, duration,…
permissive · top 5,000 on PyPI
DateTimeProvides a DateTime data type for working with…
unclear · top 5,000 on PyPI
iso8601Parses ISO 8601 date strings (e.g.…
permissive · top 5,000 on PyPI
metomi-isodatetimeParses and manipulates ISO 8601 date-time…
copyleft · top 15,000 on PyPI
timesTimes converts between universal (UTC) time and…
permissive · top 15,000 on PyPI
dateformatParses strings into datetime objects and…
permissive · top 15,000 on PyPI