import mimetypes


def to_mime(file_path):
    """
    Return the mime type from a given path

    :param file_path: Path to analyse
    :type file_path: str

    :return: Mime type
    :rtype: str
    """
    return mimetypes.guess_type(file_path)[0]