jina.types.document.mixins.dump module

class jina.types.document.mixins.dump.DumpFileMixin[source]

Bases: object

Provide helper functions for Document to dump content to a file.

dump_buffer_to_file(file)[source]

Save buffer into a file

Parameters

file (Union[str, BinaryIO]) – File or filename to which the data is saved.

Return type

~T

Returns

itself after processed

dump_uri_to_file(file)[source]

Save uri into a file

Parameters

file (Union[str, BinaryIO]) – File or filename to which the data is saved.

Return type

~T

Returns

itself after processed