python-magic
python-magic copied to clipboard
return both mime type and encoding
just like the command line version can do it