def from_buffer(buffer, mime=False):
 m = _get_magic_type(mime)
 return m.from_buffer(buffer)

def from_buffer ( buffer , mime = False ) : m = _get_magic_type ( mime ) return m . from_buffer ( buffer )
accepts a binary string and returns the detected filetype .