def detect_from_content()

in python/magic.py [0:0]


def detect_from_content(byte_content):
    '''Detect mime type, encoding and file type from bytes

    Returns a `FileMagic` namedtuple.
    '''

    return _create_filemagic(mime_magic.buffer(byte_content),
                             none_magic.buffer(byte_content))