Skip to content

LiuKeCode/pyfeishu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyFeishu

GitHub issues GitHub forks GitHub stars GitHub license contributors PyPI PyPI - Python Version Downloads

This is a msg-robot for feishu

Install

python -m pip install pyfeishu

Getting Started

send text msg

import pyfeishu
bot = pyfeishu.FeishuBot(app_id, app_secret)
msg = {"text": "test content"}
# @single user
# msg = {"text": "<at user_id='ou_xxx'>LiuKe</at>  \ntest content"}
# @all user
# msg = {"text": "<at  user_id='all'>所有人</at>  \ntest content"}
bot.send_msg(msg, 'chat_id'))

send image msg

image_key = bot.upload_image("img_path")
msg = {"image_key": image_key}
bot.send_msg(msg, 'chat_id', 'image')

Features

  • Automatically token management
  • Get chat id
  • Send text msg
  • Send rich text
  • Send image msg

Contributing

Contributions are welcome.
If you've found a bug within this project, please open an issue to discuss what you would like to change.
If it's an issue with the API, please report any new issues at pyfeishu issues