MCPcopy Create free account
hub / github.com/modelscope/modelscope / b64content

Method b64content

modelscope/utils/repo_utils.py:535–542  ·  view source on GitHub ↗

The base64-encoded content of `path_or_fileobj` Returns: `bytes`

(self)

Source from the content-addressed store, hash-verified

533 self.path_or_fileobj.seek(prev_pos, 0)
534
535 def b64content(self) -> bytes:
536 """
537 The base64-encoded content of `path_or_fileobj`
538
539 Returns: `bytes`
540 """
541 with self.as_file() as file:
542 return base64.b64encode(file.read())
543
544 @property
545 def _local_oid(self) -> Optional[str]:

Callers

nothing calls this directly

Calls 2

as_fileMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected