MCPcopy Create free account
hub / github.com/ccxt/ccxt / feed

Method feed

python/ccxt/static_dependencies/msgpack/fallback.py:322–335  ·  view source on GitHub ↗
(self, next_bytes)

Source from the content-addressed store, hash-verified

320 raise TypeError("`ext_hook` is not callable")
321
322 def feed(self, next_bytes):
323 assert self._feeding
324 view = _get_data_from_buffer(next_bytes)
325 if len(self._buffer) - self._buff_i + len(view) > self._max_buffer_size:
326 raise BufferFull
327
328 # Strip buffer before checkpoint before reading file.
329 if self._buf_checkpoint > 0:
330 del self._buffer[: self._buf_checkpoint]
331 self._buff_i -= self._buf_checkpoint
332 self._buf_checkpoint = 0
333
334 # Use extend here: INPLACE_ADD += doesn't reliably typecast memoryview in jython
335 self._buffer.extend(view)
336
337 def _consume(self):
338 """Gets rid of the used parts of the buffer."""

Callers 1

unpackbFunction · 0.95

Calls 2

_get_data_from_bufferFunction · 0.85
extendMethod · 0.45

Tested by

no test coverage detected