Name Date Size #Lines LOC

..07-Feb-2023-

file_magic/H25-Sep-2022-21

CHANGELOG.mdH A D25-Sep-2022495 2213

HOWTOH A D25-Sep-2022155 87

LICENSEH A D08-May-20221.4 KiB2623

Makefile.amH A D25-Sep-2022110 52

Makefile.inH A D25-Sep-202212.1 KiB449382

README.mdH A D08-May-2022584 3218

example.pyH A D08-May-2022207 1811

magic.pyH A D25-Sep-202210.4 KiB362287

magic.pyiH A D25-Sep-20222.3 KiB9487

pyproject.tomlH A D25-Sep-2022720 3226

setup.pyH A D08-May-2022824 2821

tests.pyH A D25-Sep-2022983 3322

threads.pyH A D25-Sep-2022497 2516

README.md

1# `file-magic`: Python Bindings
2
3This library is a Python ctypes interface to `libmagic`.
4
5
6## Installing
7
8You can install `file-magic` either with:
9
10    python setup.py install
11    # or
12    easy_install .
13    # or
14    pip install file-magic
15
16
17## Using
18
19    import magic
20
21    detected = magic.detect_from_filename('magic.py')
22    print 'Detected MIME type: {}'.format(detected.mime_type)
23    print 'Detected encoding: {}'.format(detected.encoding)
24    print 'Detected file type name: {}'.format(detected.name)
25
26
27## Developing/Contributing
28
29To run the tests:
30
31    python setup.py test
32