class Range:
Represents a Range header. All methods only support only bytes as the unit. Stores a list of ranges if given, but the methods only work if only one range is provided.
Raises | |
ValueError | If the ranges provided are invalid. |
Method | __init__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | make_content_range |
Creates a ~werkzeug.datastructures.ContentRange object from the current range and given content length. |
Method | range_for_length |
If the range is for bytes, the length is not None and there is exactly one range and it is satisfiable it returns a (start, stop) tuple, otherwise None . |
Method | to_content_range_header |
Converts the object into Content-Range HTTP header, based on given length |
Method | to_header |
Converts the object back into an HTTP header. |
Instance Variable | ranges |
Undocumented |
Instance Variable | units |
Undocumented |
~werkzeug.datastructures.ContentRange
object
from the current range and given content length.None
.