from datetime import datetime
import pytz


def from_unixtime(unixtime_, timezone_="UTC"):
    """
    Convert a unixtime int, *unixtime_*, into python datetime object

    Parameters
    ----------
    `unixtime_` : int
        Unixtime i.e. seconds since epoch
    `timezone_` : string
        The timezone of the output date from Olson timezone database. Defaults to utc.
    Returns
    -------
    datetime.datetime
        Python datetime object (timezone aware)
    Notes
    -----
    unixtime == seconds since epoch (Jan 01 1970 00:00:00 UTC)\n
    pytz http://pythonhosted.org/pytz/\n
    Unit test: UKPVLiveTestCase.test_to_unixtime
    """
    return datetime.fromtimestamp(unixtime_, tz=pytz.timezone(timezone_))