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.1.tar.gz (19.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.1-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dialog-bot-sdk-3.0.1.tar.gz
  • Upload date:
  • Size: 19.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.0.0 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for dialog-bot-sdk-3.0.1.tar.gz
Algorithm Hash digest
SHA256 1c8405bf6219b6c57de9a97b15d3cbd4433e816baec2851c2b0f551f528216f7
MD5 73bef807af523195492b02067d7659be
BLAKE2b-256 2b3115dfdea75a5027629e8abdf614b4c7c5135316fd42281b887118f3df3864

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dialog_bot_sdk-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 29.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.0.0 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for dialog_bot_sdk-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 375ab834640fa5d54dd565fa639d77e634aebc0d1a2fe32dc68843aab4d0a9bb
MD5 ca218d33a36a22017da8555f1962f01f
BLAKE2b-256 f44cbb32aa8244230380c6f3ff400ff47920dfe6d88bd3526312974047f8bb07

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