TrelloLoader#

class langchain_community.document_loaders.trello.TrelloLoader(client: TrelloClient, board_name: str, *, include_card_name: bool = True, include_comments: bool = True, include_checklist: bool = True, card_filter: Literal['closed', 'open', 'all'] = 'all', extra_metadata: Tuple[str, ...] = ('due_date', 'labels', 'list', 'closed'))[source]#

Load cards from a Trello board.

Initialize Trello loader.

Parameters:
  • client (TrelloClient) – Trello API client.

  • board_name (str) – The name of the Trello board.

  • include_card_name (bool) – Whether to include the name of the card in the document.

  • include_comments (bool) – Whether to include the comments on the card in the document.

  • include_checklist (bool) – Whether to include the checklist on the card in the document.

  • card_filter (Literal['closed', 'open', 'all']) – Filter on card status. Valid values are “closed”, “open”, “all”.

  • extra_metadata (Tuple[str, ...]) – List of additional metadata fields to include as document metadata.Valid values are “due_date”, “labels”, “list”, “closed”.

Methods

__init__(client, board_name, *[, ...])

Initialize Trello loader.

alazy_load()

A lazy loader for Documents.

aload()

Load data into Document objects.

from_credentials(board_name, *[, api_key, token])

Convenience constructor that builds TrelloClient init param for you.

lazy_load()

Loads all cards from the specified Trello board.

load()

Load data into Document objects.

load_and_split([text_splitter])

Load Documents and split into chunks.

__init__(client: TrelloClient, board_name: str, *, include_card_name: bool = True, include_comments: bool = True, include_checklist: bool = True, card_filter: Literal['closed', 'open', 'all'] = 'all', extra_metadata: Tuple[str, ...] = ('due_date', 'labels', 'list', 'closed'))[source]#

Initialize Trello loader.

Parameters:
  • client (TrelloClient) – Trello API client.

  • board_name (str) – The name of the Trello board.

  • include_card_name (bool) – Whether to include the name of the card in the document.

  • include_comments (bool) – Whether to include the comments on the card in the document.

  • include_checklist (bool) – Whether to include the checklist on the card in the document.

  • card_filter (Literal['closed', 'open', 'all']) – Filter on card status. Valid values are “closed”, “open”, “all”.

  • extra_metadata (Tuple[str, ...]) – List of additional metadata fields to include as document metadata.Valid values are “due_date”, “labels”, “list”, “closed”.

async alazy_load() AsyncIterator[Document]#

A lazy loader for Documents.

Return type:

AsyncIterator[Document]

async aload() list[Document]#

Load data into Document objects.

Return type:

list[Document]

classmethod from_credentials(board_name: str, *, api_key: str | None = None, token: str | None = None, **kwargs: Any) TrelloLoader[source]#

Convenience constructor that builds TrelloClient init param for you.

Parameters:
  • board_name (str) – The name of the Trello board.

  • api_key (str | None) – Trello API key. Can also be specified as environment variable TRELLO_API_KEY.

  • token (str | None) – Trello token. Can also be specified as environment variable TRELLO_TOKEN.

  • include_card_name – Whether to include the name of the card in the document.

  • include_comments – Whether to include the comments on the card in the document.

  • include_checklist – Whether to include the checklist on the card in the document.

  • card_filter – Filter on card status. Valid values are “closed”, “open”, “all”.

  • extra_metadata – List of additional metadata fields to include as document metadata.Valid values are “due_date”, “labels”, “list”, “closed”.

  • kwargs (Any)

Return type:

TrelloLoader

lazy_load() Iterator[Document][source]#

Loads all cards from the specified Trello board.

You can filter the cards, metadata and text included by using the optional

parameters.

Returns:

A list of documents, one for each card in the board.

Return type:

Iterator[Document]

load() list[Document]#

Load data into Document objects.

Return type:

list[Document]

load_and_split(text_splitter: TextSplitter | None = None) list[Document]#

Load Documents and split into chunks. Chunks are returned as Documents.

Do not override this method. It should be considered to be deprecated!

Parameters:

text_splitter (Optional[TextSplitter]) – TextSplitter instance to use for splitting documents. Defaults to RecursiveCharacterTextSplitter.

Returns:

List of Documents.

Return type:

list[Document]

Examples using TrelloLoader