file-types
File format determination library for Python
Create polyglots for different file types
Check if a file or extension is binary, and iterate over 250+ known binary file types including images, videos, archives, and executables. Python port of binary-extensions npm package.
A library of helper methods for your Python project to get mime types and general file category