Skip to main content

LlamaIndex Feishu Readers

PyPI version Python versions License: MIT CI Downloads 中文文档

Load documents from Feishu/Lark into LlamaIndex. This package provides three readers backed by the official lark-oapi SDK:

  • FeishuWikiReader — load documents from wiki spaces (with recursive subnode support)
  • FeishuDocsReader — load individual docx documents by token
  • FeishuDriveReader — load docx documents from cloud drive folders (with recursive subfolder support)

Installation

pip install llama-index-readers-feishu

Prerequisites

  1. Create a Feishu custom app in the developer console.
  2. Enable permissions based on the reader you use:
Reader Required scopes
Wiki wiki:wiki:readonly or wiki:node:retrieve, docs:document.content:read
Docs docs:document.content:read or docx:document:readonly
Drive drive:drive:readonly or drive:drive, docs:document.content:read
  1. Grant the app access to the target wiki space or drive folder.

Quick Start

Wiki

from llama_index.readers.feishu import FeishuWikiReader

reader = FeishuWikiReader(app_id="cli_xxx", app_secret="your_app_secret")
documents = reader.load_data(
    space_id="your_space_id",
    parent_node_token="optional_parent_node_token",
    recursive=True,
)

Docs

from llama_index.readers.feishu import FeishuDocsReader

reader = FeishuDocsReader(app_id="cli_xxx", app_secret="your_app_secret")
documents = reader.load_data(document_ids=["docx_token_1", "docx_token_2"])

Drive

from llama_index.readers.feishu import FeishuDriveReader

reader = FeishuDriveReader(app_id="cli_xxx", app_secret="your_app_secret")
documents = reader.load_data(
    folder_token="your_folder_token",
    recursive=True,
)

The drive reader loads:

  • Files with type=docx
  • Shortcuts where shortcut_info.target_type=docx

Other file types (folders, sheets, bitables, etc.) are skipped. Folders are traversed when recursive=True.

Post-process Exported Text

Feishu markdown exports may embed HTML fragments such as tables. Pass plugins to normalize loaded text:

from llama_index.readers.feishu import (
    FeishuDriveReader,
    RegexPlugin,
    html_table_to_markdown_plugin,
)

reader = FeishuDriveReader(
    app_id="cli_xxx",
    app_secret="your_app_secret",
    plugins=[
        html_table_to_markdown_plugin,
        RegexPlugin(pattern=r"\n{3,}", repl="\n\n", name="collapse_blank_lines"),
    ],
)
documents = reader.load_data(folder_token="your_folder_token")

Use default_markdown_plugins() for the built-in HTML table converter and Feishu markdown unescape plugin.

User Access Token

To access content with user identity instead of tenant identity:

reader = FeishuWikiReader(
    app_id="cli_xxx",
    app_secret="your_app_secret",
    user_access_token="u-xxxxxxxx",
)

Lark (Overseas)

reader = FeishuWikiReader(
    app_id="cli_xxx",
    app_secret="your_app_secret",
    domain="https://open.larksuite.com",
)

Or switch after initialization:

reader = FeishuWikiReader(app_id="cli_xxx", app_secret="your_app_secret")
reader.set_lark_domain()

Use with LlamaIndex

from llama_index.core import VectorStoreIndex

index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
response = query_engine.query("Summarize the content")
print(response)

Examples

Integration scripts under examples/ load live content and export markdown files. Copy .env.example to .env and fill in your credentials:

cp .env.example .env
# edit .env with your Feishu app credentials and target IDs

# Wiki
python examples/load_wiki_documents.py

# Docs
python examples/load_docs_documents.py

# Drive
python examples/load_drive_documents.py

Development

uv sync
uv run poe hooks-install
uv run poe lint
uv run poe test
uv run poe test-cov        # optional: with coverage report

License

MIT

Metadata

Release files for llama-index-readers-feishu 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-readers-feishu 0.1.0
File Size Uploaded
llama_index_readers_feishu-0.1.0.tar.gz 10.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-readers-feishu 0.1.0
File Interpreter ABI Platform
llama_index_readers_feishu-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.6 kB

Release files / llama_index_readers_feishu-0.1.0.tar.gz

Download URL llama_index_readers_feishu-0.1.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8a83889a4928ef88663f61d9dee04802781ad11367d21c928e5dfe944d38300d
BLAKE2b-256 checksum
How to use checksums
76b3f222b634496b54871cdee252d87b97d9948b49aebd3274c7737c49b73fe0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.

Transparency log

Release files / llama_index_readers_feishu-0.1.0-py3-none-any.whl

Download URL llama_index_readers_feishu-0.1.0-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad35d0e8777c4266d71f348e287bc4db2e15a0c917c0fac1c722ba55beaece7b
BLAKE2b-256 checksum
How to use checksums
33432e12de41ff143873bba16c3f0ba7f5955864347b084b393dd44badd3f13f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page