Giter VIP home page Giter VIP logo

alter's Introduction

Alter是什么?

是一个python3开发的发送信息模块

Alter支持信息?

  • 支持非ssl和ssl的EMAIL
  • 钉钉webhook机器人
  • 企业微信自定义应用

安装

  • 一步到胃
pip install alter
  • 多步安装

需要先安装requests模块

pip install requests

下载alter.py到你的项目,建议alter.py的目录有一个__init__.py的空白文件

使用

  • 钉钉webhook机器人
import alter
dtack = alter.DinTalk("e897e8fec**********") #webhook地址,只需要webhook=后面的值
ret = dtack.sendmessage("13996438187","消息") #发送的用户,以及发送的消息,多用户使用"user1|user2|user3"
if ret["errcode"]:
    print("发送成功")
else:
    print(ret["errmessage"])
  • EMAIL
import alter
smtp = alter.Email("发件人账号","发件人密码",smtp = "smtp地址",smtp_port="smtp端口 int",smtp_ssl=False)#默认ssl是True
ret = smtp.sendmessage("收件人账号",'标题','内容')
if ret["errcode"]:
    print("发送成功")
else:
    print(ret["errmessage"])
  • 企业微信自定义应用
import alter
corpid = "企业的ID"
secret = "自定义应用secret"
agentid = "自定义应用agentid"
webcat = alter.WeiXin(corpid,secret,agentid)
ret = webcat.sendmessage("消息接受者(在企业微信后台查看的账号)", "发送内容")
if ret["errcode"]:
    print("发送成功")
else:
    print(ret["errmessage"])

有问题反馈

在使用中有任何问题,欢迎反馈给我,可以用以下联系方式跟我交流

  • 邮件(351937287#qq.com, 把#换成@)
  • QQ: 351937287

关于作者

  var ihubo = {
    nickName  : "Tommy Lin",
    site : "https://www.iyunw.cn"
  }

alter's People

Contributors

lyy910203 avatar

Watchers

 avatar

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.