mime
The library is considered production ready.
from pykit import mime
print mime.get_by_filename('file.json')
# application/json
This module provide some util methods to handle mime type.
syntax:
mime.get_by_filename(filename)
Return mime type according to filename suffix.
Examples:
print mime.get_by_filename('file.json')
# application/json
arguments:
filename
: is a string.
return: mime type that predefined.
Liu Tongwei(刘桐伟) [email protected]
The MIT License (MIT)
Copyright (c) 2017 Liu Tongwei(刘桐伟) [email protected]