import json
import urllib.request  # 需要安装 urllib 库
#http://jy.erpit.cn/login
data = {
    'secret': '用户中心可查到',
    'app_key': '分组的key',
    'template_id': 'lfN7zq4zAV0xnTYyftiBrS1bDj4ClnAD8rcPDwFwHfc',
    'url': '',
    'data': {
        'first': {
            'value': '尊贵VIP',
        },
        'keyword1': {
            'value': 'VIP一号',
        },
        'keyword2': {
            'value': '888888888888元',
        },
        'remark': {
            'value': '最土豪',
        },
    }
}
url = 'http://jy.erpit.cn/api/message/send'
headers = {'content-type': 'application/json'}
response = urllib.request.Request(url, json.dumps(data).encode('UTF-8'), headers)
page = urllib.request.urlopen(response)
html = page.read()
result = json.loads(html)
print(html)