acceptparse

Parses a variety of Accept-* headers.

These headers generally take the form of:

value1; q=0.5, value2; q=0

Where the q parameter is optional. In theory other parameters exists, but this ignores them.


Attributes

a part_re

<_sre.SRE_Pattern object at 0x8dbf178>

Functions

f parse_accept(value) ...

Parses an Accept-* style header.

A list of [(value, quality), ...] is returned. quality will be 1 if it was not given.

Classes

C Accept(...) ...

Represents a generic Accept-* style header.

This object should not be modified. To add items you can use accept_obj + 'accept_thing' to get a new object

This class contains 8 members.

C NilAccept(...) ...

Represents an Accept header with no value.

This class contains 9 members.

C NoAccept(...) ...

This class contains 9 members.

C MIMEAccept(...) ...

Represents the Accept header, which is a list of mimetypes.

This class knows about mime wildcards, like image/*

This class contains 9 members.

C MIMENilAccept(...) ...

This class contains 9 members.

See the source for more information.