Skip to main content

企业微信机器人

Project description

Work Weixin Robot

企业微信机器人

org author github pypi ref

Installation

pip install WorkWeixinRobot

Usage

init a weixin robot

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from WorkWeixinRobot.work_weixin_robot import WWXRobot
wwx = WWXRobot(key='Robot Key')

Send Text Message

wwx.send_text(content='Hello')

Send Markdown Message

wwx.send_markdown(content='Hello')

Send Image Message

# Method I: Send local image
wwx.send_image(local_file='local_image.jpg')
# Method II: Send remote URL image
wwx.send_image(remote_url='http://www.baoxian-sz.com/wp-content/uploads/2019/07/logo_logo_zhenxinhuaxian_tiw_600_150.png')

Send Articles Message [ Image + Text ]

articles = [
    {
        'title': 'Article I',
        'description': 'Article I Description',  # Optional
        'url': 'URL I',
        'picurl': 'Article I Picture URL',  # Optional
    },
    {
        'title': 'Article II',
        'description': 'Article II Description',  # Optional
        'url': 'URL II',
        'picurl': 'Article II Picture URL',  # Optional
    }
]
wwx.send_news(articles=articles)

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for WorkWeixinRobot, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size WorkWeixinRobot-0.1.0-py3-none-any.whl (3.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size WorkWeixinRobot-0.1.0.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page