msgqywx 使用企业微信的应用消息推送实时信息

Related tags

Miscellaneousmsgqywx
Overview

msgqywx

使用企业微信的应用消息推送实时信息

注:markdown支持无法在微信中查看

Install

pip install git+https://github.com/veink-y/msgqywx.git

Params

  • corpid: 企业ID,在管理后台获取
  • corpsecret: 自建应用的Secret,每个自建应用里都有单独的secret
  • agentid: 应用ID,在后台应用中获取
  • touser: 接收者用户名(微信账号),多个用户用|分割,与发送消息的touser至少存在一个

Usage

**事项详情** >事 项:开会 >组织者:@miglioguan >参与者:@miglioguan、@kunliu、@jamdeezhou、@kanexiong、@kisonwang > >会议室:广州TIT 1楼 301 >日 期:2018年5月18日 >时 间:上午9:00-11:00 > >请准时参加会议。 > >如需修改会议信息,请点击:[修改会议信息](https://work.weixin.qq.com)""" wx.send_msg(md_text, msgtype="markdown", raise_error=True) # 发送markdown消息,注意markdown消息仅企业微信可接收 ">
from msgqywx import msgqywx

if __name__ == '__main__':
    wx = msgqywx(corpid='ww7e42424723224ba8ff49',
                 corpsecret='we0YB4242424242_J2332PnmA',
                 agentid='2115353',
                 touser='xxxxxxxxxx',
                 )
    wx.send_msg("这是测试信息")  # 使用初始类的touser
    wx.send_msg("这是另一个测试消息", touser="xxxxx")  # 自定义接收的账号

    md_text = """您的会议室已经预定,稍后会同步到`邮箱`
                >**事项详情**
                >事 项:\"info\">开会
                >组织者:@miglioguan
                >参与者:@miglioguan、@kunliu、@jamdeezhou、@kanexiong、@kisonwang
                >
                >会议室:\"info\">广州TIT 1楼 301
                >日 期:\"warning\">2018年5月18日
                >时 间:\"comment\">上午9:00-11:00
                >
                >请准时参加会议。
                >
                >如需修改会议信息,请点击:[修改会议信息](https://work.weixin.qq.com)"""
    wx.send_msg(md_text, msgtype="markdown", raise_error=True)  # 发送markdown消息,注意markdown消息仅企业微信可接收

Limit

基础频率

每企业调用单个cgi/api不可超过1万次/分,15万次/小时;
每ip调用单个cgi/api不可超过2万次/分,60万次/小时;
第三方应用提供商每ip调用单个cgi/api不可超过4万次/分,120万次/小时;

发送应用消息频率

每应用不可超过帐号上限数*200人次/天(注:若调用api一次发给1000人,算1000人次;若企业帐号上限是500人,则每个应用每天可发送100000人次的消息);
每应用对同一个成员不可超过30次/分钟,超过部分会被丢弃不下发;
发消息频率不计入基础频率;

You might also like...
Releases(0.7.0)
Owner
Demon Finch
Only the Paranoid Survive
Demon Finch
Change ACLs for QNAP LXD unprivileged container.

qnaplxdunpriv If Advanced Folder Permissions is enabled in QNAP NAS, unprivileged LXD containers won't start. qnaplxdunpriv changes ACLs of some Conta

1 Jan 10, 2022
adbsync - An ADB syncing helper

adbsync - An ADB syncing helper What's this? Everytime I wanted to make a backup of my phone, or restore those files onto it, I had to use everytime t

Giovanni Gualtieri 3 Aug 05, 2022
pyForgeCert is a Python equivalent of the original ForgeCert written in C#.

pyForgeCert is a Python equivalent of the original ForgeCert written in C#.

Evi1cg 47 Oct 08, 2022
A data driven app for bicycle hiring in London(UK)

bicycle_hiring_app_deployed A data driven app for bicycle hiring in London(UK). It predicts expected number of bicycle hire in London. It asks users t

Rajarshi Roy Raju 1 Dec 10, 2021
A Pythonic Data Catalog powered by Ray that brings exabyte-level scalability and fast, ACID-compliant, change-data-capture to your big data workloads.

DeltaCAT DeltaCAT is a Pythonic Data Catalog powered by Ray. Its data storage model allows you to define and manage fast, scalable, ACID-compliant dat

45 Oct 15, 2022
Personal Chat Assistance

Python-Programming Personal Chat Assistance {% import "bootstrap/wtf.html" as wtf %} titleEVT/title script src="https://code.jquery.com/jquery-3.

PRASH_SMVIT 2 Nov 14, 2021
MODSKIN-LOLPRO-updater: The mod is fkn 10y old and has'nt a self-updater

The mod is fkn 10y old and has'nt a self-updater. To use it just run the exec, wait some seconds, and it will run the new modsk

Shiro Amurha 3 Apr 23, 2022
Python Library to get fast extensive Dummy Data for testing

Dumda Python Library to get fast extensive Dummy Data for testing https://pypi.org/project/dumda/ Installation pip install dumda Usage: Cities from d

Oliver B. 0 Dec 27, 2021
Practice in Oxford_AI&ML class

Practice in Oxford_AI&ML class

St3ve Lee 2 Feb 04, 2022
Example platform plugin that fixes fentry calls in Binja

Example Binja Platform Plugin This is an example Binja platform plugin which fixes up linux kernel module calls to __fentry__. __fentry__ is the linux

_yrp 2 Oct 07, 2021
Lagrange Interpolation Method-Python

Lagrange Interpolation Method-Python The Lagrange interpolation formula is a way to find a polynomial, called Lagrange polynomial, that takes on certa

Motahare Soltani 2 Jul 05, 2022
Free version of Okuru selfbot, okuru.xyz

Indigo Selfbot Free OpenSource selfbot, Premium version can be found at https://okuru.xyz (5$.) Usage python[3] main.py Installation To install you ca

Dimitri Demarkus 31 Aug 07, 2022
A python module for DeSo

DeSo.py A python package for DeSo. Developed by ItsAditya Run pip install deso to install the module! Examples of How To Use DeSo.py Getting $DeSo pri

ItsAditya 0 Jun 30, 2022
JD扫码获取Cookie 本地版

JD扫码获取Cookie 本地版 请无视手机上的提示升级京东版本的提示! 下载链接 https://github.com/Zy143L/jd_cookie/releases 使用Python实现 代码很烂 没有做任何异常捕捉 但是能用 请不要将获取到的Cookie发送给任何陌生人 如果打开闪退 请使

Zy143L 420 Dec 11, 2022
An AI-powered device to stop people from stealing my packages.

Package Theft Prevention Device An AI-powered device to stop people from stealing my packages. Installation To install on a raspberry pi, clone the re

rydercalmdown 157 Nov 24, 2022
To attract customers, the hotel chain has added to its website the ability to book a room without prepayment

To attract customers, the hotel chain has added to its website the ability to book a room without prepayment. We need to predict whether the customer is going to reject the booking or not. Since in c

Taychinov Evgeniy 0 Aug 04, 2022
A bash-like intrepreted language

A Bash-like interpreted scripting language.

AshVXmc 1 Oct 28, 2021
Credit Card Fraud Detection

Credit Card Fraud Detection For this project, I used the datasets from the kaggle competition called IEEE-CIS Fraud Detection. The competition aims to

RayWu 4 Jun 21, 2022
TB Set color display - Add-on for Blender to set multiple objects and material Display Color at once.

TB_Set_color_display Add-on for Blender with operations to transfer name between object, data, materials and action names Set groups of object's or ma

1 Jun 01, 2022
A type based dependency injection framework for Python 3.9+

Alluka A type based dependency injection framework for Python 3.9+. Installation You can install Alluka from PyPI using the following command in any P

Lucina 16 Dec 15, 2022