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.8rc7.tar.gz
(28.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dialog-bot-sdk-3.0.8rc7.tar.gz.
File metadata
- Download URL: dialog-bot-sdk-3.0.8rc7.tar.gz
- Upload date:
- Size: 28.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b1ecf23765bfb3456d45e4a8a48b5eab2bf82df5ad7cd00faead983d6fd100e
|
|
| MD5 |
b34a108cd6f8e4dbd3787580278b4029
|
|
| BLAKE2b-256 |
f0413fb82f937d09396033585523d58c46bcdd3c31da418c77ed2de28e03c6cd
|
File details
Details for the file dialog_bot_sdk-3.0.8rc7-py3-none-any.whl.
File metadata
- Download URL: dialog_bot_sdk-3.0.8rc7-py3-none-any.whl
- Upload date:
- Size: 46.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a45e4138fc178fdd1c6292c1a6d91abdb9061c26b07077533463fb6636f247bd
|
|
| MD5 |
8ba7f93688f5ddf8e7693397d789232b
|
|
| BLAKE2b-256 |
f63bafbcfa7c7893d5493064fcb7d8c4ac25e117b1a7a16649979f1935204fcd
|