lightweight dingtalk api for python
Project description
描述
基于 钉钉开放平台 封装的 轻量级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)
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
dingapi-0.0.6.tar.gz
(5.0 kB
view details)
File details
Details for the file dingapi-0.0.6.tar.gz
.
File metadata
- Download URL: dingapi-0.0.6.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b43e148ca7f96f3fd6ecd215978aaeb9cca4bd7d14900f5a1bb50a84754a7fe0 |
|
MD5 | 7ecc8b6b4d19661d4ad0871ae85abb0d |
|
BLAKE2b-256 | 281f1310ba78a591815fbac3a633b96adb524724ed152567e0235314da260435 |