module documentation

Multi-part parsing for file uploads. Exposes one class, ``MultiPartParser``, which feeds chunks of uploaded data to file upload handlers for processing.

Class BoundaryIter A Producer that is sensitive to boundaries.
Class ChunkIter An iterable that will yield chunks of data. Given a file-like object as the constructor, yield chunks of read operations from that object.
Class InterBoundaryIter A Producer that will iterate over boundaries.
Class LazyStream The LazyStream wrapper allows one to get and "unget" bytes from a stream.
Class MultiPartParser A rfc2388 multipart/form-data parser.
Class Parser Undocumented
Exception InputStreamExhausted No more reads are allowed from this device.
Exception MultiPartParserError Undocumented
Function exhaust Exhaust an iterator or stream.
Function parse_boundary_stream Parse one and exactly one stream that encapsulates a boundary.
Function parse_header Parse the header into a key-value.
Constant FIELD Undocumented
Constant FIELD_TYPES Undocumented
Constant FILE Undocumented
Constant RAW Undocumented
Function _parse_header_params Undocumented
def exhaust(stream_or_iterable): (source)

Exhaust an iterator or stream.

def parse_boundary_stream(stream, max_header_size): (source)

Parse one and exactly one stream that encapsulates a boundary.

def parse_header(line): (source)

Parse the header into a key-value. Input (line): bytes, output: str for key/name, bytes for values which will be decoded later.

Undocumented

Value
'field'
FIELD_TYPES = (source)

Undocumented

Value
frozenset([FIELD, RAW])

Undocumented

Value
'file'

Undocumented

Value
'raw'
def _parse_header_params(s): (source)

Undocumented