langchain_community.document_loaders.trello
.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.
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.
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]
- classmethod from_credentials(board_name: str, *, api_key: Optional[str] = None, token: Optional[str] = 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 (Optional[str]) – Trello API key. Can also be specified as environment variable TRELLO_API_KEY.
token (Optional[str]) – 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
- 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_and_split(text_splitter: Optional[TextSplitter] = 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]