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[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)
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-1.2.1.tar.gz
(158.2 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-1.2.1.tar.gz.
File metadata
- Download URL: dialog-bot-sdk-1.2.1.tar.gz
- Upload date:
- Size: 158.2 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
619e033f9793f6c765deb313b16f473d3e5b71db8a419d68c3caf93b125f91be
|
|
| MD5 |
cdb3986c54482424a78729a938fb9b4f
|
|
| BLAKE2b-256 |
9aedfa72807b229c93ce3b817df093e34fb87b77616c89ebd92bc1f1bb072993
|
File details
Details for the file dialog_bot_sdk-1.2.1-py3-none-any.whl.
File metadata
- Download URL: dialog_bot_sdk-1.2.1-py3-none-any.whl
- Upload date:
- Size: 200.7 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c057c22733f078015f697c7295270cc78ab3493ca2959205d2474d0a690e07e4
|
|
| MD5 |
bdb5c7340e9126789551bca01e2164ee
|
|
| BLAKE2b-256 |
356c06ad69239a9a3b6533b71cc595a629ba4bddc54e5b510979c903d5d39c85
|