module documentation

Handling of media types, as found in HTTP Content-Type and Accept headers. See https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7

Function media_type_matches Returns ``True`` if the media type in the first argument <= the media type in the second argument. The media types are strings as described by the HTTP spec.
Function order_by_precedence Returns a list of sets of media type strings, ordered by precedence. Precedence is determined by how specific a media type is:
Class _MediaType No class docstring; 1/1 property, 0/5 instance variable, 1/3 method documented
def media_type_matches(lhs, rhs): (source)

Returns ``True`` if the media type in the first argument <= the media type in the second argument. The media types are strings as described by the HTTP spec. Valid media type strings include: 'application/json; indent=4' 'application/json' 'text/*' '*/*'

def order_by_precedence(media_type_lst): (source)

Returns a list of sets of media type strings, ordered by precedence. Precedence is determined by how specific a media type is: 3. 'type/subtype; param=val' 2. 'type/subtype' 1. 'type/*' 0. '*/*'