file-type-detection
File format determination library for Python
Fast metadata extraction for any file type: detects MIME from magic bytes (not the extension) and reads EXIF/GPS, image/audio/video tags, PDF, archives, hashes, and entropy. One Rust core with CLI, Python (pip), and Node (npm) packages.
A library of helper methods for your Python project to get mime types and general file category