Skip to main content

This is a msg-robot for DingTalk.

Project description

PyDingTalk

GitHub issues GitHub forks GitHub stars GitHub license contributors PyPI PyPI - Python Version Downloads

This is a msg-robot for DingTalk

Install

python -m pip install pydingtalk

Getting Started

send text msg

import pydingtalk

token = "c30*****71"
key = "SEC*****"
bot = pydingtalk.Bot(token, key)
data = {"msgtype": "text","text": {"content":"LiuKeTest"}}
bot.bot_send(data)

# @ user
# data = {"at": {"atMobiles": ["18xxx", "13xxx"]}, "msgtype": "text","text""": {"content":"LiuKeTest"}}
# @ all user
# data = {"at": {"isAtAll": True}, "msgtype": "text","text""": {"content":"LiuKeTest"}}
bot.send_msg(msg, 'chat_id'))

send link

data = {"msgtype": "link", "link": {"text":"LiuKeTest", "title": "Test", "picUrl": "https://xxx", "messageUrl": "https://xxx"}}

send link

data = {"msgtype": "markdown", "markdown": {"title": "LiuKeTest", "text": "### LiuKeTest @138XXXXXXXX \n > [pydingtalk](https://pypi.org/project/pydingtalk)"}}

More message types, please visit DingTalk.

Features

  • Supports all types message

Contributing

Contributions are welcome.
If you've found a bug within this project, please open an issue to discuss what you would like to change.
If it's an issue with the API, please report any new issues at pydingtalk issues

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PyDingTalk-0.1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file PyDingTalk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: PyDingTalk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.26.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for PyDingTalk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 015fc1187f6b2dd0330aedb32230625e7cb351b64dc28c2f72fe4c1b8b715c6c
MD5 98c51ebb81b1a1aa5a61e9f6a7dc5d1f
BLAKE2b-256 4b6d4746e5bf373cb8d28224de4b4b26d362db419bf87de2b00cff786e62dbd9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page