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[0].peer, 'Reply to : ' + str(params[0].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(on_msg)
Metadata
Release files for dialog-bot-sdk 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dialog-bot-sdk-1.3.0.tar.gz | 158.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dialog_bot_sdk-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 358.8 kB
Release files / dialog-bot-sdk-1.3.0.tar.gz
| Download URL | dialog-bot-sdk-1.3.0.tar.gz |
|---|---|
| Size | 158.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64e9b340f2d9f2ed41f39034a337576ed6648f4781521851ad1bd115897867bc
|
|
BLAKE2b-256 checksum How to use checksums |
a51c3cba2feebae01f5e215954a52bc585b279447c7d28c9bfbee58cc4c889f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.1
|
Release files / dialog_bot_sdk-1.3.0-py3-none-any.whl
| Download URL | dialog_bot_sdk-1.3.0-py3-none-any.whl |
|---|---|
| Size | 200.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c8e3bf9c5ee3a86146d8fc6c92612ec6129db7fa3a0b1d30bc35ad4fae1378f
|
|
BLAKE2b-256 checksum How to use checksums |
21c810b43bcfa0481e8b8658cf288dfb4cb00d412781cacb4501e96f43e6e06c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.1
|