MCPcopy Create free account
hub / github.com/BaseXdb/basex / sendall

Method sendall

basex-api/src/main/python/BaseXClient/BaseXClient.py:81–87  ·  view source on GitHub ↗

sendall with specified byte encoding if data is not bytearray, bytes (maybe str). if data is bytearray or bytes, it will be passed to native sendall API directly.

(self, data)

Source from the content-addressed store, hash-verified

79 return result_bytes
80
81 def sendall(self, data):
82 """sendall with specified byte encoding if data is not bytearray, bytes
83(maybe str). if data is bytearray or bytes, it will be passed to native sendall API
84directly."""
85 if isinstance(data, (bytearray, bytes)):
86 return self.__s.sendall(data)
87 return self.__s.sendall(bytearray(data, self.send_bytes_encoding))
88
89 def __getattr__(self, name):
90 return lambda *arg, **kw: getattr(self.__s, name)(*arg, **kw)

Callers 3

sendMethod · 0.80
__send_inputMethod · 0.80
__send_binary_inputMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected