module documentation

Multi-part parsing for file uploads.

Exposes one class, MultiPartParser, which feeds chunks of uploaded data to file upload handlers for processing.

Constant FIELD Undocumented
Constant FILE Undocumented
Constant RAW Undocumented
Class ​Boundary​Iter A Producer that is sensitive to boundaries.
Class ​Chunk​Iter 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 ​Input​Stream​Exhausted No more reads are allowed from this device.
Class ​Inter​Boundary​Iter A Producer that will iterate over boundaries.
Class ​Lazy​Stream The LazyStream wrapper allows one to get and "unget" bytes from a stream.
Class ​Multi​Part​Parser A rfc2388 multipart/form-data parser.
Class ​Multi​Part​Parser​Error Undocumented
Class ​Parser Undocumented
Function ​_parse​_header​_params 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.
FIELD: str =

Undocumented

Value
'field'
FILE: str =

Undocumented

Value
'file'
RAW: str =

Undocumented

Value
'raw'
def _parse_header_params(s):

Undocumented

def exhaust(stream_or_iterable):
Exhaust an iterator or stream.
def parse_boundary_stream(stream, max_header_size):
Parse one and exactly one stream that encapsulates a boundary.
def parse_header(line):

Parse the header into a key-value.

Input (line): bytes, output: str for key/name, bytes for values which will be decoded later.