Python Bot SDK for Dialog Messenger
Project description
Dialog Python Bot SDK
Python Bot SDK for Dialog messenger.
Full documentation is available here.
Usage
from dialog_bot_sdk.bot import DialogBot
import grpc
import os
def on_msg(params):
bot.messaging.send_message(params.peer, 'Reply to : ' + str(params.message.text_message.text))
if __name__ == '__main__':
bot = DialogBot.get_secure_bot(
os.environ.get('BOT_ENDPOINT'), # bot endpoint from environment
grpc.ssl_channel_credentials(), # SSL credentials (empty by default!)
os.environ.get('BOT_TOKEN') # bot token from environment
)
bot.messaging.on_message_async(on_msg)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dialog-bot-sdk-3.0.6.tar.gz
(28.1 kB
view hashes)
Built Distribution
Close
Hashes for dialog_bot_sdk-3.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3531934d37ee67147b7fb50d13f711bd583b8906bba79d7af6f0fa800cddd9a |
|
MD5 | bc21c1b9bcb3237d9f9371afddf8a7bd |
|
BLAKE2b-256 | ef655f75eedaac8a1b295f42480ecd64a8614a598a2cccf44a4f98af95d2342b |