Metadata-Version: 1.1
Name: file
Version: 0.2.1
Summary: CFFI bindings for libmagic.
Home-page: https://github.com/ionelmc/python-file
Author: Ionel Cristian Mărieș
Author-email: contact@ionelmc.ro
License: MIT license
Description-Content-Type: UNKNOWN
Description: ========
        Overview
        ========
        
        
        
        CFFI bindings for libmagic.
        
        * Free software: MIT License
        
        Installation
        ============
        
        ::
        
            pip install file
        
        Usage
        =====
        
        .. code-block:: python
        
            from file import Magic
        
            with Magic() as magic:
                print(magic.buffer("hello")) # => "text/plain"
        
            from file import magic_buffer, magic_file, magic_setflags
        
            magic = Magic()
            mimetype = magic_buffer("\x89\x50\x4E\x47\x0D\x0A\x1A\x0A")
            print(mimetype) # => "image/png"
        
            mimetype = magic_file("/etc/passwd")
            print(mimetype) # => "text/plain"
        
            from file import MAGIC_NONE
            magic_setflags(MAGIC_NONE)
            mimetype = magic_file("demo.docx")
            print(mimetype) # => "Microsoft Word 2007+"
            magic.close() # don't forget about this
        
        
        Changelog
        =========
        
        0.1.0 (2017-11-02)
        ------------------
        
        * First release on PyPI.
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Utilities
