filetype.py
filetype.py copied to clipboard
Small, dependency-free, fast Python package to infer binary file types checking the magic numbers signature
Based on the package metadata, this library supports a long range of python versions but has no GHA pipelines testing them, which makes it a real risk for its consumers....
will filetype support ofd detection? current ofd file will be detected as zip file
I've this code that works just fine locally: ```Python file_bytes = file.file.read() kind = filetype.guess(file_bytes) ``` `file` type is UploadFile from FastAPI. So, `file.read()` returns a `bytes` object. I'm using...
I have a pdf for which filetype is unable to recognize the extension. ``` !wget -O bulk/3.pdf bulk -q https://www.nature.com/articles/s41467-023-38544-z.pdf ``` ``` import filetype out = filetype.guess("./bulk/3.pdf") print(out) # None...
Can you please add SVG support? Thank you!