file-type-detection
File format determination library for Python
Helper functions for your .Net, Python, JavaScript, and Java projects to get mime types and general file category
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.