Skip to content

applearound/dingtalk_robot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DingTalk Robot

This project is a DingTalk robot implemented using Python's aiohttp library.

Features

  • Asynchronous message handling
  • Supports all message types

Usage

import asyncio

from dtalk_robot import Robot
from dtalk_robot.request import RequestBody, TextBody
from dtalk_robot.response import ResponseBody

async def send(request_body: RequestBody) -> ResponseBody:
    async with Robot(access_token="access_token", secret="secret") as robot:
        return await robot.send_message(request_body)

text_msg: RequestBody = RequestBody.text_message(text=TextBody(content="Hello World!"))

response = asyncio.run(send(text_msg))

print(f"response[code={response.errcode}]: {response.errmsg}")

About

An asynchronous DingTalk robot implemented in Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages