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.text_message.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.7.tar.gz (28.2 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.7-py3-none-any.whl (46.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dialog-bot-sdk-3.0.7.tar.gz
  • Upload date:
  • Size: 28.2 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.4.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for dialog-bot-sdk-3.0.7.tar.gz
Algorithm Hash digest
SHA256 e289afbced8bffa345eb1262aff7599134a35322d518c867e40a0ef0f8f69bec
MD5 4e8a69585edb94dc4b8d6b7ec55e2461
BLAKE2b-256 1b91642102e89814199542f1ea50eb4e1a321e84c984371b16d8e45ab369f369

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dialog_bot_sdk-3.0.7-py3-none-any.whl
  • Upload date:
  • Size: 46.4 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.4.0 requests-toolbelt/0.8.0 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for dialog_bot_sdk-3.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2399805e2d380faf663a0e0d7e30984cda000c9adcd52dfb4b4a1c010e109217
MD5 3dc5dde9e84dbeecd8aeb0bfe4b58893
BLAKE2b-256 c2a4f78e78cbc035c4855e5b768f6b53240e81c5a231c0f6e5f9b7c4c61cf416

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