ahupp / python-magic

A python wrapper for libmagic
Other
2.6k stars 280 forks source link

make api compatible with the python bindings of libmagic #239

Closed L0ric0 closed 3 years ago

L0ric0 commented 3 years ago

the linux file command / libmagic has its own python bindings wich exposes a smal api. As both projects use the same module name and have different apis it is quite hard for package maintainers to figure out which one is needed for the program they want to package and to have both module installed at the same time.

To make this a bit easier it would be nice if this project could implement the api of the python bindings of libmagic so that project maintainers can say that python-magic can replace the bindings of libmagic.

(Also please mention this in the Readme whether you implement this or not)

edit: The python bindings for libmagic can be found here https://github.com/file/file/tree/master/python

ahupp commented 3 years ago

I have good news for you! A change to do just this landed in January and is available as 0.4.22. See this section of the readme (just updated for clarity):

https://github.com/ahupp/python-magic/blob/master/README.md#libmagic-python-api-compatability