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 2.1.1
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-2.1.1.tar.gz | 159.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dialog_bot_sdk-2.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 361.9 kB
Release files / dialog-bot-sdk-2.1.1.tar.gz
| Download URL | dialog-bot-sdk-2.1.1.tar.gz |
|---|---|
| Size | 159.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14859b9aedc86352c331438bac2f3e765c1f31e841db63931814ec4903c162a2
|
|
BLAKE2b-256 checksum How to use checksums |
4b5eb93ce594cb610472aa4fe911cc0307a8f380a861d56dc262546367e4f2bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.32.1 CPython/3.7.3
|
Release files / dialog_bot_sdk-2.1.1-py3-none-any.whl
| Download URL | dialog_bot_sdk-2.1.1-py3-none-any.whl |
|---|---|
| Size | 202.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3888006742800ecf78f460db61d964bfde5bdeb864699034b8ae74ab2ad04ec9
|
|
BLAKE2b-256 checksum How to use checksums |
e9a98ef9a026f89dc67b3aeca0d379cfc17992fe36819d02eadb08af11a8053a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.32.1 CPython/3.7.3
|