描述
基于 钉钉开放平台 封装的 轻量级Python-Sdk
因目前个人需求 只需要发送工作通知到钉钉,所以目前只封装了工作通知消息的接口和部分用户相关的接口
安装
pip install -U dingapi
使用
from dingapi.client import DingApi
AppKey = 'xxxxx'
AppSecret = 'xxxxx'
AgentId = 'xxxxx'
# 创建一个客户端
dingApi = DingApi(AppKey, AppSecret, AgentId)
# 获取用户信息
r = dingApi.user.get(user_id)
print(r)
# 发送工作通知给钉钉用户
r = dingApi.message.asyncsend_v2({
"msgtype": "text",
"text": {
"content": "消息内容",
},
},
userid_list='' # 用户 id列表
)
print(r)
Metadata
Release files for dingapi 0.0.6
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 | |
|---|---|---|---|---|
| dingapi-0.0.6.tar.gz | 5.0 kB | Without provenance | Details |
Release files / dingapi-0.0.6.tar.gz
| Download URL | dingapi-0.0.6.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b43e148ca7f96f3fd6ecd215978aaeb9cca4bd7d14900f5a1bb50a84754a7fe0
|
|
BLAKE2b-256 checksum How to use checksums |
281f1310ba78a591815fbac3a633b96adb524724ed152567e0235314da260435
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.4
|
Security for dingapi 0.0.6
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.