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.textMessage.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.2.tar.gz
(26.8 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.2.tar.gz.
File metadata
- Download URL: dialog-bot-sdk-3.0.2.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee5f2ecac0f24c8c387b1fab5f180773841025eeda94905df00623b5fd900202
|
|
| MD5 |
018bbd0dbd68dcf96714a942ca33a083
|
|
| BLAKE2b-256 |
692abcc83fbb0f7d7011af39d1ce1dd37661214f7769b361418d92fe3e4217d3
|
File details
Details for the file dialog_bot_sdk-3.0.2-py3-none-any.whl.
File metadata
- Download URL: dialog_bot_sdk-3.0.2-py3-none-any.whl
- Upload date:
- Size: 44.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2c44ffd12e72982c4595484b863c7ad48390f72e19606e4bdbdc30f7f009b5b
|
|
| MD5 |
49af3db16e00b51cc9e2e970e7e2f2a2
|
|
| BLAKE2b-256 |
930ac6a4dabe6e05c90af48e791ed6445d81f35311dfca66959dda81784180fe
|