skillfed

maya

Datetimes for Humans.

maya v0.6.1 175.1K downloads/30d#10,272 on PyPI3,411
Permissive license MIT DORMANT released

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 maya

uv

uv add maya

poetry

poetry add maya

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: ImplementationProgramming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Libraries :: Python Modules

Tags

human-friendly datetime parsingtimezone-aware datetime librarynatural language date parsingdatetime formatting and manipulationparse dates from web scrapinghuman slang datetime conversioncalendar event time ranges
datetime-parsingtimezone-handlingweb-scraping

More Python Modules packages