MCPcopy Create free account
hub / github.com/datapane/datapane / _rangeiter

Function _rangeiter

python-client/src/datapane/_vendor/bottle.py:2818–2826  ·  view source on GitHub ↗

Yield chunks from a range in a file.

(fp, offset, limit, bufsize=1024 * 1024)

Source from the content-addressed store, hash-verified

2816
2817
2818def _rangeiter(fp, offset, limit, bufsize=1024 * 1024):
2819 """ Yield chunks from a range in a file. """
2820 fp.seek(offset)
2821 while limit > 0:
2822 part = fp.read(min(limit, bufsize))
2823 if not part:
2824 break
2825 limit -= len(part)
2826 yield part
2827
2828
2829def static_file(filename, root,

Callers 1

static_fileFunction · 0.85

Calls 1

readMethod · 0.80

Tested by

no test coverage detected