kennethreitz.org / Software / Maya

Maya: Datetimes for Humans

Maya is a Python library that simplifies working with datetimes. It provides a simple and intuitive interface for parsing, formatting, and manipulating dates and times, making it easier to work with temporal data in Python.

Features

Installation

You can install Maya using pip:

$ pip install maya

Usage

Here's an example of how you can use Maya to work with datetimes in Python:

import maya

# Create a datetime object
dt = maya.now()

# Format the datetime as a string
formatted_dt = dt.rfc2822()

print(formatted_dt)

This will output the current datetime in RFC 2822 format.

Links