from datetime import datetime


def unix_to_datetime(timestamp):
    """
    Converts a Unix timestamp (like: 1400566301) to a datetime.

    Parameters:
    timestamp -- a Unix timestamp like: 1400566301.
    """
    return datetime.fromtimestamp(float(timestamp))