SDKFeishu - 飞书开放平台Python SDK
一个基于飞书开放平台API,简单易用的非官方Python SDK,提供获取访问令牌、Bitable表格记录CRUD操作、文件上传下载等功能。
功能特性
- 获取飞书访问令牌
- 多维表格(bitable)操作:
- 知识空间管理
- 表格记录CRUD操作
- 文件上传与下载
- 全面且详细的功能文档
环境要求
- Python 3.6+
通过 pip 安装
pip install SDKFeishu
依赖安装
直接通过 pip 安装的 SDKFeishu 无需再手动安装依赖
pip install requests requests-toolbelt
快速开始
from SDKFeishu import get_access_token, Bitable
# 1. 获取访问令牌
app_id = "your_app_id"
app_secret = "your_app_secret"
access_token = get_access_token(app_id, app_secret)
# 2. 初始化Bitable客户端
bitable = Bitable(access_token, "your_app_token")
# 3. 使用示例 - 查询表格记录
records = bitable.find_table_record("your_table_id")
print(records)
API参考
获取访问令牌
get_access_token(app_id: str, app_secret: str) -> str
Bitable类方法
get_wiki_space_list()- 获取知识空间列表get_wiki_child_space_list(space_id)- 获取子空间列表get_wiki_space_info(space_id)- 获取知识空间信息find_table_record(table_id)- 查询表格记录create_table_record(table_id, fields)- 创建记录update_table_record(table_id, record_id, fields)- 更新记录delete_table_record(table_id, record_id)- 删除记录upload_media(file, file_name, file_size, parent_node)- 上传文件download_media_by_link(file_token)- 下载文件
错误处理
所有方法在请求失败时会返回包含状态码和错误信息的字符串
贡献
欢迎提交 Pull Request 或 Issue 报告问题
许可证
MIT
Metadata
Release files for SDKFeishu 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sdkfeishu-0.0.1.tar.gz | 4.8 kB | Without provenance | Details for sdkfeishu-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sdkfeishu-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for sdkfeishu-0.0.1-py3-none-any.whl |
Total release size: 9.8 kB
Release files / sdkfeishu-0.0.1.tar.gz
| Download URL | sdkfeishu-0.0.1.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed47fd97f54ee4f1504681623c892775918e2466a35807e0c39286ea5c2b799f
|
|
BLAKE2b-256 checksum How to use checksums |
99e1fcb4d1d31b2ac08360ff042a4f104351eba6791e93bfe032fd729f5d4504
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Release files / sdkfeishu-0.0.1-py3-none-any.whl
| Download URL | sdkfeishu-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44b30a99be0f140d2aa46e7c62a6c68639de75196f0bf6cf97d4f862e63a81e5
|
|
BLAKE2b-256 checksum How to use checksums |
06817ce7bb6ab24b009f45a1d03d5e2e767b1ef3a82246b701c993ae21f80852
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Security for SDKFeishu 0.0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.