docarray.document.mixins.blob module#
- class docarray.document.mixins.blob.BlobDataMixin[source]#
Bases:
objectProvide helper functions for
Documentto handle binary data.- load_uri_to_blob(**kwargs)[source]#
Convert
uritoblobinplace. Internally it downloads from the URI and setblob.- Parameters:
kwargs – keyword arguments to pass to :meth:_uri_to_blob such as timeout
- Return type:
T
- Returns:
itself after processed
- convert_blob_to_datauri(charset='utf-8', base64=False)[source]#
Convert
blobto datauriin place. Internally it first reads into blob and then converts it to data URI.- Parameters:
charset (
str) – charset may be any character set registered with IANAbase64 (
bool) – used to encode arbitrary octet sequences into a form that satisfies the rules of 7bit. Designed to be efficient for non-text 8 bit and binary data. Sometimes used for text data that frequently uses non-US-ASCII characters.
- Return type:
T
- Returns:
itself after processed