Skip to main content

Lite SDK for Dingtalk

Project description

#Dingtalk lite SDK ##A lite Dingtalk SDK to simplify sending message #Example ###To send a message with markdown format:

text = "### I am the header\n" + \
       "#### This is a test message, do not worry.\n" + \
       "![girl](https://c-ssl.duitang.com/uploads/item/201605/08/20160508134621_KjzNa.thumb.700_0.gif)\n" + \
       "1. This is the first line\n" + \
       "2. This is the second line\n"
token = 'your-dingtalk-robot-token'
client = Client("https://oapi.dingtalk.com/robot/send")
response = client.send_markdown(token, '[Ambari Alert]', text)

###If you want to @ somebody:

token = 'your-dingtalk-robot-token'
client = Client("https://oapi.dingtalk.com/robot/send")
at_mobiles = ['185xxxxxxxx', '137xxxxxxxx']
response = client.send_text(token, "[Ambari Alert] This is a test message, do not worry.", at_mobiles)

###See client_test.py to get more usages

Project details


Download files

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

Files for dingtalk-lite, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size dingtalk_lite-1.0.2-py2.py3-none-any.whl (5.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page