langchain_community.document_loaders.notiondb
.NotionDBLoader¶
- class langchain_community.document_loaders.notiondb.NotionDBLoader(integration_token: str, database_id: str, request_timeout_sec: Optional[int] = 10)[source]¶
Load from Notion DB.
Reads content from pages within a Notion Database. :param integration_token: Notion integration token. :type integration_token: str :param database_id: Notion database id. :type database_id: str :param request_timeout_sec: Timeout for Notion requests in seconds.
Defaults to 10.
Initialize with parameters.
Methods
__init__
(integration_token, database_id[, ...])Initialize with parameters.
A lazy loader for Documents.
load
()Load documents from the Notion database.
load_and_split
([text_splitter])Load Documents and split into chunks.
load_page
(page_summary)Read a page.
- __init__(integration_token: str, database_id: str, request_timeout_sec: Optional[int] = 10) None [source]¶
Initialize with parameters.
- load() List[Document] [source]¶
Load documents from the Notion database. :returns: List of documents. :rtype: List[Document]
- load_and_split(text_splitter: Optional[TextSplitter] = None) List[Document] ¶
Load Documents and split into chunks. Chunks are returned as Documents.
- Parameters
text_splitter – TextSplitter instance to use for splitting documents. Defaults to RecursiveCharacterTextSplitter.
- Returns
List of Documents.