Skip to main content

Wecom(A.K.A. WeChat Work) Group Bot python API.

Project description

pywgb

Wecom(A.K.A. WeChat Work) Group Bot python API.

Homepage

ChowRex/pywgb: Wecom(A.K.A Wechat Work) Group Bot python API.

How to use

  1. Create a Wecom Group Bot.

  2. Copy the webhook URL or just the key. It should be like:

  3. Install this package:

    pip install -U pywgb
    
  4. Refer code below:

    from pywgb import TextWeComGroupBot, MarkdownWeComGroupBot, ImageWeComGroupBot
    
    KEY = "PASTE_YOUR_KEY_OR_WEBHOOKURL_HERE"
    
    # If you want to send Text message, use this.
    msg = "This is a test Text message."
    bot = TextWeComGroupBot(KEY)
    bot.send(msg)
    
    # If you want to send Markdown message, use this.
    msg = "# This is a test Markdown title message."
    bot = MarkdownWeComGroupBot(KEY)
    bot.send(msg)
    
    # If you want to send Image message, use this.
    file = "Path/To/Your/Image.png" or "Path/To/Your/Image.jpg"
    bot = ImageWeComGroupBot(KEY)
    bot.send(file_path=file)
    
    # If you want to send News message, use this.
    articles = [
        {
            "title": "This is a test news",
            "description": "You can add description here",
            "url":  # Here is the link of picture
                "www.tencent.com",
            "picurl": "https://www.tencent.com/img/index/tencent_logo.png"
        },
    ]
    bot = NewsWeComGroupBot(KEY)
    bot.send(articles=articles)
    

Official Docs

Only Chinese version doc: 群机器人配置说明 - 文档 - 企业微信开发者中心

Roadmap

  • v0.0.1: 🎉 Initial project. Offering send Text and Markdown type message.

  • v0.0.2: 🖼️ Add Image type message support;

    Add overheat detect function and unified exception handling

  • v0.0.3: 📰 Add News type message support;

    Move bots into a new module: bot

  • v0.0.4: 📂 Add File type message support.

  • v0.0.5: 🗣️ Add Voice type message support.

  • v0.0.6: 🗒️ Add TextCard type message support.

  • v0.0.7: 🗃️ Add PictureCard type message support.

  • v0.1.0: 👍 First FULL capacity stable version release.Fix bugs and so on.

Project details


Download files

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

Source Distribution

pywgb-0.0.3.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pywgb-0.0.3-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file pywgb-0.0.3.tar.gz.

File metadata

  • Download URL: pywgb-0.0.3.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pywgb-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2c4d69e42ffa66a5a3c2da404524729b88205fc87c576064cb59bf3533d3168a
MD5 514db3fb02e26dd3385bd44c1c451b73
BLAKE2b-256 73ba993f6ae79192dbc994793fdf98f662aec84122769c8de5e87e4662c7325c

See more details on using hashes here.

File details

Details for the file pywgb-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pywgb-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pywgb-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 05c2ecc7778a84e49773eaf8de59119573d9176812792e13eccf66db43b17c51
MD5 bb4e0b49794d8bfe6468fa35f10fcb76
BLAKE2b-256 6e5277f8db2c5dc37ab8d532f19cf8c7c262e1f015978d9ce32b1a984eed4ead

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page