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.3.2
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.3.2.tar.gz | 17.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dialog_bot_sdk-2.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.7 kB
Release files / dialog-bot-sdk-2.3.2.tar.gz
| Download URL | dialog-bot-sdk-2.3.2.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7aad2d3e0b437214dcd139d845b97ece5338ac1bf612b32e580a5371825df07
|
|
BLAKE2b-256 checksum How to use checksums |
a9048742de3c1675f9c6253c189fb828f8198480a3df3911b0d2eb66c6397d20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.8.0 tqdm/4.40.2 CPython/3.8.0
|
Release files / dialog_bot_sdk-2.3.2-py3-none-any.whl
| Download URL | dialog_bot_sdk-2.3.2-py3-none-any.whl |
|---|---|
| Size | 25.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3456cff42d2d52bf75381c4082b943c26ee9eafbfe441e9cd083e356f070365b
|
|
BLAKE2b-256 checksum How to use checksums |
8e24e572a901f64e0cb58cde463e4eccc36fa497446ed03dccf7313385d4598b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.8.0 tqdm/4.40.2 CPython/3.8.0
|