Skip to main content

Send message to you by feishu bot.

Project description

feishubot

Send message to you by feishu bot

Install

pip install feishubot2

If you need send image, you need install with media option

pip install feishubot2[media]

Usage

  1. Set environment FEISHU_APP_ID and FEISHU_APP_SECRET to use feishu api
  2. set FEISHU_PHONE or FEISHU_EMAIL or FEISHU_OPEN_ID for sending message to you

when environment was not set correctly, bot will be disable

Feature

  • Send plain message
  • Send file
  • Send image
  • Send video with cover
  • Send audio
  • Send simple card

Examples

from feishubot import bot

def test_send_text(self):
    bot.send_text("This is a test message.")

def test_send_file(self):
    with open(__file__, "rb") as f:
        bot.send_file(f, "stream")

def test_send_image(self):
    bot.send_image(requests.get("https://random.imagecdn.app/500/150").content)

def send_audio(self):
    with open("test.opus", "rb") as f:
        bot.send_audio(f)

def test_send_media(self):
    with open("test.mp4", "rb") as f:
        bot.send_media(f)

def test_send_card(self):
    bot.send_card("This is a test **message**.", header="Test card")

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

feishubot2-0.0.3.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

feishubot2-0.0.3-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: feishubot2-0.0.3.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for feishubot2-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ce0a96fd63812ec12d64ea672407909ee931976994c5f38d50c822fa1e50d44f
MD5 d897484af5f0da2b5b72a28e33e018da
BLAKE2b-256 d2f87c6e163977ec3616a64a0b622caf8b609ac7381da9721f2eb352be6dcd60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: feishubot2-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for feishubot2-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e8056fadb8165ae7ef54f6d5df704acda1655a75f429f6ccdb976dd261d7f9c6
MD5 c4c2c76602daf304a36aefc00828d364
BLAKE2b-256 8c52aad45dcbaa637109e423be63b44d3de229e6902936ab3e0511bdf5b459ad

See more details on using hashes here.

Supported by

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