this package use finds all types of file extension or mime types.
Project description
filemime
Python package to infer file type and MIME
INSTALL PACKAGE
pip install filemime
Features
- Provides file extension and MIME type
- File discovery by extension or MIME type
- Fast, even processing large files
- Cross-platform file recognition
IMPORT PACKAGE
All type of file extension
and mimetype
support
Python 3.7.3 (default, Oct 7 2019, 12:56:13)
[GCC 8.3.0] on windows
Type "help", "copyright", "credits" or "license" for more information.
from filemime import filemime
obj = filemime()
LOAD FILE
>>> obj.load_file("D:\\photos\\IMG_4917.JPG")
"""JPEG image data, Exif standard: [TIFF image data, little-endian, direntries=12,
manufacturer=Canon, model=Canon EOS 1500D, orientation=lower-left, xresolution=196,
yresolution=204, resolutionunit=2, datetime=2021:10:16 18:03:06], baseline, precision 8,
6000x4000, frames 3"""
MIME TYPE
>>> obj.load_file("D:\\photos\\IMG_4917.JPG",mimeType=True)
'image/jpeg'
>>>
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
filemime-0.0.3.tar.gz
(1.8 MB
view hashes)