package documentation

Mime types.

From __init__.py:

Function extension_for Returns the extension of a given mime type.
Function for_path Returns the mime type for a given path.
Function get Return the normalized mime type.
Constant BIN Undocumented
Constant CSS Undocumented
Constant CSV Undocumented
Constant GEOJSON Undocumented
Constant GIF Undocumented
Constant GML Undocumented
Constant GML2 Undocumented
Constant GML3 Undocumented
Constant GZIP Undocumented
Constant HTML Undocumented
Constant JPEG Undocumented
Constant JS Undocumented
Constant JSON Undocumented
Constant PDF Undocumented
Constant PNG Undocumented
Constant SVG Undocumented
Constant TTF Undocumented
Constant TXT Undocumented
Constant XML Undocumented
Constant ZIP Undocumented
Function _get_quick Undocumented
Variable _aliases Undocumented
Variable _common Undocumented
Variable _common_extensions Undocumented
BIN: str = (source)

Undocumented

Value
'application/octet-stream'
CSS: str = (source)

Undocumented

Value
'text/css'
CSV: str = (source)

Undocumented

Value
'text/csv'
GEOJSON: str = (source)

Undocumented

Value
'application/geojson'
GIF: str = (source)

Undocumented

Value
'image/gif'
GML: str = (source)

Undocumented

Value
'application/gml+xml'
GML2: str = (source)

Undocumented

Value
'application/gml+xml; version=2'
GML3: str = (source)

Undocumented

Value
'application/gml+xml; version=3'
GZIP: str = (source)

Undocumented

Value
'application/gzip'
HTML: str = (source)

Undocumented

Value
'text/html'
JPEG: str = (source)

Undocumented

Value
'image/jpeg'

Undocumented

Value
'application/javascript'
JSON: str = (source)

Undocumented

Value
'application/json'
PDF: str = (source)

Undocumented

Value
'application/pdf'
PNG: str = (source)

Undocumented

Value
'image/png'
SVG: str = (source)

Undocumented

Value
'image/svg+xml'
TTF: str = (source)

Undocumented

Value
'application/x-font-ttf'
TXT: str = (source)

Undocumented

Value
'text/plain'
XML: str = (source)

Undocumented

Value
'application/xml'
ZIP: str = (source)

Undocumented

Value
'application/zip'

Undocumented

_common_extensions = (source)

Undocumented

_aliases = (source)

Undocumented

def get(mt: str) -> t.Optional[str]: (source)

Return the normalized mime type.

Parameters
mt:strMime type or content type.
Returns
t.Optional[str]The normalized mime type.
def _get_quick(mt): (source)

Undocumented

def for_path(path: str) -> str: (source)

Returns the mime type for a given path.

Parameters
path:strPath to mime type.
Returns
strThe mime type or BIN if type is unknown.
def extension_for(mt: str) -> t.Optional[str]: (source)

Returns the extension of a given mime type.

Parameters
mt:strMime type.
Returns
t.Optional[str]The mime type extension.