Reusable Python toolkit for Yuque OpenAPI
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yuque_toolkit-0.1.0.tar.gz
(7.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yuque_toolkit-0.1.0.tar.gz.
File metadata
- Download URL: yuque_toolkit-0.1.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5145815e8f40a2f7b03de1839471148c8be7feda28262759c010ae21f6998ac1
|
|
| MD5 |
ed85f181c26c063f7b6e2a2423088018
|
|
| BLAKE2b-256 |
d0b274238a08f58c7374f1b106f54e551df3734a93b8efea579997ad00055c36
|
File details
Details for the file yuque_toolkit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: yuque_toolkit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63343523bc5c538754284e3921701b22c24d47e7049870e8b1f0801f6f51b56c
|
|
| MD5 |
d3cd481882812a9d3b96fa9b15953e6c
|
|
| BLAKE2b-256 |
953ac7006a83e6af0200eebcf009944ea92b84ffcde73fa1422bd7e017a0f333
|