mirror of
https://git.freebsd.org/ports.git
synced 2025-06-15 17:50:31 -04:00
Pure python implementation of magic file detection. PR: 258593 Submitted by: James French
12 lines
610 B
Text
12 lines
610 B
Text
Puremagic is a python module that will identify a file from magic numbers.
|
|
|
|
It is designed to be minimalistic and inherently cross platform compatible.
|
|
It is also designed to be a stand in for python-magic, it incorporates the
|
|
functions from_file(filename[, mime]) and from_string(string[, mime])
|
|
however the magic_file() and magic_string() are more powerful and will also
|
|
display confidence and duplicate matches.
|
|
|
|
It does NOT try to match files off non-magic string. In other words it will
|
|
not search for a string within a certain window of bytes like others might.
|
|
|
|
WWW: https://pypi.org/project/puremagic/
|