from datetime import datetime


def str2timestamp(str_timestamp: str, date_format: str = '%d.%m.%Y %H:%M:%S') -> datetime:
    """
    convert a string into a datetime object
    :param str_timestamp:
    :param date_format:
    :return:
    """
    return datetime.strptime(str_timestamp, date_format)