This module uses ctypes to access the libmagic file type identification library. It makes use of the local magic database and supports both textual and MIME-type output.