Skip to main content

Python Bot SDK for Dialog Messenger

Project description

Dialog Python Bot SDK

PyPI PyPI - Downloads PyPI - License

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.peer, 'Reply to : ' + str(params.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_async(on_msg)

Project details


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-3.0.4.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dialog_bot_sdk-3.0.4-py3-none-any.whl (46.2 kB view details)

Uploaded Python 3

File details

Details for the file dialog-bot-sdk-3.0.4.tar.gz.

File metadata

  • Download URL: dialog-bot-sdk-3.0.4.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for dialog-bot-sdk-3.0.4.tar.gz
Algorithm Hash digest
SHA256 dd39dcfd1ceeff9c2f15f434e2535b0379cb8b54839bd4d9ede9f8d09f3190af
MD5 86ee8f830d5812b8e50b9fda9822faf6
BLAKE2b-256 78aaf3fb523925a61ccdfc400ce354f69e5ba719a7d3ba0514d0d00b70a72f56

See more details on using hashes here.

File details

Details for the file dialog_bot_sdk-3.0.4-py3-none-any.whl.

File metadata

  • Download URL: dialog_bot_sdk-3.0.4-py3-none-any.whl
  • Upload date:
  • Size: 46.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for dialog_bot_sdk-3.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 770658d0cfa9d04fb68618972dd64e6f9b66126138f23f07e28832f2f2434175
MD5 c34442417aa6b725fa166e7f25198391
BLAKE2b-256 ab249a9b7ceae7f2b9baaf95a1dc115f1bb1b8ab631343f4fc74393881167274

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page