diff options
| author | Adam Hupp <adam@hupp.org> | 2019-12-11 22:42:55 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-11 22:42:55 -0800 |
| commit | 7d130f6863e4444fc82ab53fcb0ab8ea508d2156 (patch) | |
| tree | ecf5b5727e0f16efafdf410c3caca5954e1189cd /README.md | |
| parent | 5aaf07c23af59abce40dced60875301ad9557b2c (diff) | |
| download | python-magic-7d130f6863e4444fc82ab53fcb0ab8ea508d2156.tar.gz | |
Update README.md
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -14,7 +14,8 @@ functionality is exposed to the command line by the Unix command >>> import magic >>> magic.from_file("testdata/test.pdf") 'PDF document, version 1.2' ->>> magic.from_buffer(open("testdata/test.pdf").read(2048)) # use at least 2048 bytes here for safe detection of for example "xslx" files +# recommend using at least the first 2048 bytes, as less can produce incorrect identification +>>> magic.from_buffer(open("testdata/test.pdf").read(2048)) 'PDF document, version 1.2' >>> magic.from_file("testdata/test.pdf", mime=True) 'application/pdf' @@ -41,6 +42,10 @@ You can also combine the flag options: 'text/plain' ``` +## Bug Reports + +python-magic is a thin layer over the libmagic C library. Historically, most bugs that have been reported against python-magic are actually bugs in libmagic; libmagic bugs can be reported on their tracker here: https://bugs.astron.com/my_view_page.php. If you're not sure where the bug lies feel free to file an issue on github and I can triage it. + ## Versioning Minor version bumps should be backwards compatible. Major bumps are not. |
