Skip to content

Latest commit

 

History

History

mime

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Table of Content

Name

mime

Status

The library is considered production ready.

Synopsis

from pykit import mime

print mime.get_by_filename('file.json')
#  application/json

Description

This module provide some util methods to handle mime type.

Methods

mime.get_by_filename

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.

Author

Liu Tongwei(刘桐伟) [email protected]

Copyright and License

The MIT License (MIT)

Copyright (c) 2017 Liu Tongwei(刘桐伟) [email protected]