class documentation

class BoundaryIter:

View In Hierarchy

A Producer that is sensitive to boundaries.

Will happily yield bytes until a boundary is found. Will yield the bytes before the boundary, throw away the boundary bytes themselves, and push the post-boundary bytes back on the stream.

The future calls to next() after locating the boundary will raise a StopIteration exception.

Method __init__ Undocumented
Method __iter__ Undocumented
Method __next__ Undocumented
Method ​_find​_boundary Find a multipart boundary in data.
Instance Variable ​_boundary Undocumented
Instance Variable ​_done Undocumented
Instance Variable ​_rollback Undocumented
Instance Variable ​_stream Undocumented
def __init__(self, stream, boundary):

Undocumented

def __iter__(self):

Undocumented

def __next__(self):

Undocumented

def _find_boundary(self, data):

Find a multipart boundary in data.

Should no boundary exist in the data, return None. Otherwise, return a tuple containing the indices of the following:

  • the end of current encapsulation
  • the start of the next encapsulation
_boundary =

Undocumented

_done: bool =

Undocumented

_rollback =

Undocumented

_stream =

Undocumented