langchain.document_loaders.base.BaseBlobParser

class langchain.document_loaders.base.BaseBlobParser[source]

Abstract interface for blob parsers.

A blob parser provides a way to parse raw data stored in a blob into one or more documents.

The parser can be composed with blob loaders, making it easy to reuse a parser independent of how the blob was originally loaded.

Methods

__init__()

lazy_parse(blob)

Lazy parsing interface.

parse(blob)

Eagerly parse the blob into a document or documents.

__init__()
abstract lazy_parse(blob: Blob) Iterator[Document][source]

Lazy parsing interface.

Subclasses are required to implement this method.

Parameters

blob – Blob instance

Returns

Generator of documents

parse(blob: Blob) List[Document][source]

Eagerly parse the blob into a document or documents.

This is a convenience method for interactive development environment.

Production applications should favor the lazy_parse method instead.

Subclasses should generally not over-ride this parse method.

Parameters

blob – Blob instance

Returns

List of documents