Description
Identifies file types from Python using libmagic, the same kind of detection used by the file command. It helps tools inspect uploads, classify files, choose converters, or reject unexpected content.
File type detection is helpful but not a complete security boundary. Applications should combine it with size checks, parsing safeguards, and policy rules for untrusted files.