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
Nateve transpiler developed with python.

Adam Adam is a Nateve Programming Language transpiler developed using Python. Nateve Nateve is a new general domain programming language open source i

Nateve 7 Jan 15, 2022
Customizable-menu-python - User customizable menu in Python

Menu personalizável pelo usuário em Python A minha ideia com esse projeto pessoa

Renan Barbosa 4 Oct 28, 2022
A middle-to-high level algorithm book designed with coding interview at heart!

Hands-on Algorithmic Problem Solving A one-stop coding interview prep book! About this book In short, this is a middle-to-high level algorithm book de

Li Yin 1.8k Jan 02, 2023
nbsafety adds a layer of protection to computational notebooks by solving the stale dependency problem when executing cells out-of-order

nbsafety adds a layer of protection to computational notebooks by solving the stale dependency problem when executing cells out-of-order

150 Jan 07, 2023
Data wrangling & common calculations for results from qMem measurement software

qMem Datawrangler This script processes output of qMem measurement software into an Origin ® compatible *.csv files and matplotlib graphs to quickly v

Julian 1 Nov 30, 2021
The Begin button and menu for the Meadows operating system. The start button for UNIX/Linux.

By: Seanpm2001, Meadows Et; Al. Top README.md Read this article in a different language Sorted by: A-Z Sorting options unavailable ( af Afrikaans Afri

Sean P. Myrick V19.1.7.2 4 Aug 28, 2022
A OBS service to package a published repository into a tar.gz file

OBS Source Service obs-service-publish_tar obs-service-publish_tar will create a archive.tar[.tar compression] archive containing the published repo

Erico Mendonca 1 Feb 16, 2022
Configure request params such as text, color, size etc. And then download the image

Configure request params such as text, color, size etc. And then download the image

6 Aug 18, 2022
Tools to convert SQLAlchemy models to Pydantic models

Pydantic-SQLAlchemy Tools to generate Pydantic models from SQLAlchemy models. Still experimental. How to use Quick example: from typing import List f

Sebastián Ramírez 893 Dec 29, 2022
A scuffed remake of Kahoot... Made by Y9 and Y10 SHSB

A scuffed remake of Kahoot... Made by Y9 and Y10 SHSB

Tobiloba Kujore 3 Oct 28, 2022
An example project which contains the Unity components necessary to complete Navigation2's SLAM tutorial with a Turtlebot3, using a custom Unity environment in place of Gazebo.

Navigation 2 SLAM Example This example provides a Unity Project and a colcon workspace that, when used together, allows a user to substitute Unity as

Unity Technologies 183 Jan 04, 2023
An Android app that runs Elm in a webview. And a Python script to build the app or install it on the device.

Requirements You need to have installed: the Android SDK Elm Python git Starting a project Clone this repo and cd into it: $ git clone https://github.

Benjamin Le Forestier 11 Mar 17, 2022
Stori QA Automation Challenge

Stori-QA-Automation-Challenge This is the repository is created for the Stori QA Intern Automation Engineer Challenge! In this you can find the Requir

Daniel Castañeda 0 Feb 20, 2022
A collection of daily usage utility scripts in python. Helps in automation of day to day repetitive tasks.

Kush's Utils Tool is my personal collection of scripts which is used to automated daily tasks. It is a evergrowing collection of scripts and will continue to evolve till the day I program. This is al

Kushagra 10 Jan 16, 2022
Check a discord message and give it a percentage of scamminess

scamChecker Check a discord message and give it a percentage of scamminess Run the bot, and run the command !scamCheck and it will return a percentage

3 Sep 22, 2022
Python data loader for Solar Orbiter's (SolO) Energetic Particle Detector (EPD).

Data loader (and downloader) for Solar Orbiter/EPD energetic charged particle sensors EPT, HET, and STEP. Supports level 2 and low latency data provided by ESA's Solar Orbiter Archive.

Jan Gieseler 9 Dec 16, 2022
ioztat is a storage load analysis tool for OpenZFS

ioztat is a storage load analysis tool for OpenZFS. It provides iostat-like statistics at an individual dataset/zvol level.

Jim Salter 116 Nov 25, 2022
Mini-calculadora escrita como exemplo para uma palestra relâmpago sobre `git bisect`

Calculadora Mini-calculadora criada para uma palestra relâmpado sobre git bisect. Tem até uma colinha! Exemplo de uso Modo interativo $ python -m calc

Eduardo Cuducos 3 Dec 14, 2021
Data repo for one-among.us

Our Data Data repo for one-among.us File Structure Directory /people/userid/: Data for a specific person info.json5: Profile information page.md: Pr

Hykilpikonna 55 Dec 30, 2022
Fisherman is a free open source fishing bot written in python.

Fisherman is a free open source fishing bot written in python.

Pure | Cody 33 Jan 29, 2022