Skip to content

python-magic

Category: Files and apps

Homepage: http://github.com/ahupp/python-magic

Vendor: ahupp

License: MIT

Source: Python

Profiles: Full, Basic

import magic; magic.from_file('file')

Tips

libmagic bindings giving the same identification as the file command. magika is the machine learning alternative.

Usage

import magic; magic.from_file('file')