Yuque Toolkit
yuque-toolkit 是一个面向 Python 项目的语雀 SDK,封装了常用的语雀 OpenAPI 调用能力,适合在自动化脚本、内容同步任务和内部业务系统中复用。
Features
- Get current user info
- Get repository detail
- List repository documents
- Get document detail
- Create document
- Update document
- Get repository TOC
- Update repository TOC
Installation
pip install yuque-toolkit
Environment Variables
YUQUE_BASE_URL=https://www.yuque.com
YUQUE_TOKEN=your_token_here
YUQUE_GROUP_LOGIN=your_group_or_user_login
YUQUE_BOOK_SLUG=your_book_slug
Quick Start
import os
from yuque_toolkit import YuqueClient, load_dotenv
load_dotenv()
client = YuqueClient(
token=os.getenv("YUQUE_TOKEN", ""),
base_url=os.getenv("YUQUE_BASE_URL", "https://www.yuque.com"),
)
result = client.list_docs(
os.getenv("YUQUE_GROUP_LOGIN", ""),
os.getenv("YUQUE_BOOK_SLUG", ""),
limit=10,
)
print(result)
CLI
yuque-toolkit me
yuque-toolkit repo
yuque-toolkit docs --limit 10
yuque-toolkit toc
Release files for yuque-toolkit 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yuque_toolkit-0.1.0.tar.gz | 7.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yuque_toolkit-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:14.8 kB
Release files / yuque_toolkit-0.1.0.tar.gz
| Download URL | yuque_toolkit-0.1.0.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5145815e8f40a2f7b03de1839471148c8be7feda28262759c010ae21f6998ac1
|
|
BLAKE2b-256 checksum How to use checksums |
d0b274238a08f58c7374f1b106f54e551df3734a93b8efea579997ad00055c36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / yuque_toolkit-0.1.0-py3-none-any.whl
| Download URL | yuque_toolkit-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63343523bc5c538754284e3921701b22c24d47e7049870e8b1f0801f6f51b56c
|
|
BLAKE2b-256 checksum How to use checksums |
953ac7006a83e6af0200eebcf009944ea92b84ffcde73fa1422bd7e017a0f333
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|