Index of the mimeparse module
-
m
httpencode.mimeparse
...
- MIME-Type Parser
- a __credits__ ...
- a __email__ ...
- f best_match ... - Takes a list of supported mime-types and finds the best match for all the media-ranges listed in header. The value of header must be a string that conforms to the format of the HTTP Accept: header. The value of 'supported' is a list of mime-types.
- f quality_parsed ... - Find the best match for a given mime_type against a list of media_ranges that have already been parsed by parse_media_range(). Returns the 'q' quality parameter of the best match, 0 if no match was found. This function bahaves the same as quality() except that 'parsed_ranges' must be a list of parsed media ranges.
- f parse_mime_type ... - Carves up a mime_type and returns a tuple of the (type, subtype, params) where 'params' is a dictionary of all the parameters for the media range. For example, the media range 'application/xhtml;q=0.5' would get parsed into:
-
f
parse_media_range
...
-
Carves up a media range and returns a tuple of the (type, subtype, params) where 'params' is a dictionary of all the parameters for the media range. For example, the media range 'application/*;q=0.5' would get parsed into:
- f quality ... - Returns the quality 'q' of a mime_type when compared against the media-ranges in ranges. For example: