Automation tools for feishu
Project description
AutoFeishu
飞书官方接口的Python封装, 需要自行注册飞书应用
参数配置
本项目使用pydantic_settings读取参数,有多种方法用于设置参数。优先级顺序如下:
-
代码中设置
from feishu import config config.api_key = 'xxx' config.api_secret = 'xx'
-
环境变量(case-insensitive): 所有相关环境变量以
FEISHU_开头,例如FEISHU_API_KEY,FEISHU_API_SECRET -
.env文件(case-insensitive) -
pyproject.toml文件(case-sensitive)[tool.auto-feishu] api_key = "xxx" api_secret = "xxx" ...
配置内容
api_key: 飞书应用的App IDapi_secret: 飞书应用的App Secretbase_url: 飞书API的base url,默认https://open.feishu.cn/open-apisphone,email,open_id: 用于Contact获取默认的用户信息
TODO: 文档
https://mkdocstrings.github.io/usage/
当前接口
Approval: 创建、同意、拒绝审批,获取审批详情Contact: 根据手机号或邮箱获取open_idMessage: 向指定联系人或群发送文本、文件、图片、卡片SpreadSheet: 读写多维表格Group: 群组管理
新增接口开发
继承feishu.client.BaseClient。
AuthClient封装了get,post,put,_request等方法,可以自动鉴权发送HTTP请求。- 属性
api用于保存各个api的别名和url:{name: /api, ...}
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
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 auto_feishu-0.0.6.tar.gz.
File metadata
- Download URL: auto_feishu-0.0.6.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2043c544ec4fddbc3b55f9586b9d6b2b228ea8403d52827c8db37699dbaac674
|
|
| MD5 |
d03bc96e3a987ac9af2e96c09a7d681b
|
|
| BLAKE2b-256 |
0fb166d594098d961d7f55fe0a7ebcdcdb3e9a02a30f770795bece1606322343
|
Provenance
The following attestation bundles were made for auto_feishu-0.0.6.tar.gz:
Publisher:
publish.yml on Dragon-GCS/AutoFeishu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
auto_feishu-0.0.6.tar.gz -
Subject digest:
2043c544ec4fddbc3b55f9586b9d6b2b228ea8403d52827c8db37699dbaac674 - Sigstore transparency entry: 164330991
- Sigstore integration time:
-
Permalink:
Dragon-GCS/AutoFeishu@b9e322df1262c07ba43f97f87b43ab888da8d42d -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/Dragon-GCS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b9e322df1262c07ba43f97f87b43ab888da8d42d -
Trigger Event:
push
-
Statement type:
File details
Details for the file auto_feishu-0.0.6-py3-none-any.whl.
File metadata
- Download URL: auto_feishu-0.0.6-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03f0870f984849ef12922783cf6f67f34fb2d16fe9fbef7f4e81ca6e0cc20143
|
|
| MD5 |
6d07ab02f19ec36e319ee90609e1741f
|
|
| BLAKE2b-256 |
0a1106e16de0912f3298649a224e1c178c94152d6184df145314a38d97a6794d
|
Provenance
The following attestation bundles were made for auto_feishu-0.0.6-py3-none-any.whl:
Publisher:
publish.yml on Dragon-GCS/AutoFeishu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
auto_feishu-0.0.6-py3-none-any.whl -
Subject digest:
03f0870f984849ef12922783cf6f67f34fb2d16fe9fbef7f4e81ca6e0cc20143 - Sigstore transparency entry: 164330994
- Sigstore integration time:
-
Permalink:
Dragon-GCS/AutoFeishu@b9e322df1262c07ba43f97f87b43ab888da8d42d -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/Dragon-GCS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b9e322df1262c07ba43f97f87b43ab888da8d42d -
Trigger Event:
push
-
Statement type: