GithubHelp home page GithubHelp logo

qcloudsms-python3's Introduction

qcloudsms-python3

中文

腾讯云短信SDK for Python 3(官方Python SDK只兼容Python 2),修改自官方SDK。

用法

在本repo根目录创建下面的Python文件

import json
from Sms.sms import SmsSingleSender

appid = 1000000
appkey = "ffffffffffffffffffffffffff"  
single_sender = SmsSingleSender(appid, appkey)

templ_id = 20000
phone_number = "132xxxxxxxx"
params = ["赋影", "100.00"]
result = single_sender.send_with_param("86", phone_number, templ_id, params, "", "", "")
rsp = json.loads(result)
print(rsp)

其余功能的具体使用与官方SDK类似,可以参考官方SDK使用样例

注意: 这个例子引入SDK的方式和官方文档有所不同,目录结构较官方文档也少一层,使用的时候需自行注意这些问题。

English

Tencent Cloud SMS SDK for Python 3 (Official Python SDK only supports Python 2), adapted from official SDK。

Usage

Create a python file under the directory of this repo

import json
from Sms.sms import SmsSingleSender

appid = 1000000
appkey = "ffffffffffffffffffffffffff"  
single_sender = SmsSingleSender(appid, appkey)

templ_id = 20000
phone_number = "132xxxxxxxx"
params = ["ShadowMov", "100.00"]
result = single_sender.send_with_param("86", phone_number, templ_id, params, "", "", "")
rsp = json.loads(result)
print(rsp)

The rest usage are similar to the official SDK. You can see the official repo example for help.

Caution: This example is slightly different from official document while importing the SDK and the directory structure is not the same. You should notice these problems.

qcloudsms-python3's People

Contributors

samhjn avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

wyh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.