Python front end for libmagic(3)
Project description
file-magic
: Python Bindings
This library is a Python ctypes interface to libmagic
.
Installing
You can install file-magic
either with:
python setup.py install
# or
easy_install .
# or
pip install file-magic
Using
import magic
detected = magic.detect_from_filename('magic.py')
print 'Detected MIME type: {}'.format(detected.mime_type)
print 'Detected encoding: {}'.format(detected.encoding)
print 'Detected file type name: {}'.format(detected.name)
Developing/Contributing
To run the tests:
python setup.py test
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
file-magic-0.4.1.tar.gz
(5.7 kB
view hashes)
Built Distribution
Close
Hashes for file_magic-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb9496a1656baf75cadd771479f63b53081095e968d0be72b9b7a7ed538e4fb8 |
|
MD5 | 2ff6ba9efb94459517203b3eaaebde45 |
|
BLAKE2b-256 | bd13de7c05b7b64f4e41cca7385642884490e2fa704dc1e695d1429119caa9c2 |