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)
License
Metadata
Release files for dialog-bot-sdk 1.2.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.2.0.tar.gz | 157.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dialog_bot_sdk-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 358.3 kB
Release files / dialog-bot-sdk-1.2.0.tar.gz
| Download URL | dialog-bot-sdk-1.2.0.tar.gz |
|---|---|
| Size | 157.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ab7be88ef7b638d9a2d6085758193c1a0a1b3e5ad8570bcd20d23f92fcd87aa
|
|
BLAKE2b-256 checksum How to use checksums |
a5eda06c0015dfd0c5924d18fca9fcb91ab966d61cf641f585f9a8fb34f52370
|
| 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.2.0-py3-none-any.whl
| Download URL | dialog_bot_sdk-1.2.0-py3-none-any.whl |
|---|---|
| Size | 200.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e730f92128938d9440964e6e5132a7747d5db55f466f748a1a31ebe0871699ad
|
|
BLAKE2b-256 checksum How to use checksums |
3747502106531874c45cc1c4ec84a01f3d719c36ebc7ed2a05ead4c2d129cec5
|
| 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
|