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[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


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-2.2.2.tar.gz (12.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-2.2.2-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dialog-bot-sdk-2.2.2.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for dialog-bot-sdk-2.2.2.tar.gz
Algorithm Hash digest
SHA256 f7d936eeb68ac0af24474183571c5f67403192a7a60633889f0dd71f3af7ed32
MD5 4d878f0cde2171f8a206ff1142fbf1bf
BLAKE2b-256 2b48f1feca044756fd3bf17fae442ef777bd5985e122050aff2fe48f6045caf0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dialog_bot_sdk-2.2.2-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for dialog_bot_sdk-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0ec604bdb4165674c21cb02d9e9c74f5ee7e83bda23b2c9da5f646fb9881d319
MD5 b3b705e410b8b663fd2d6aa189bdfa31
BLAKE2b-256 4510f41eb4dce549639273598b0b9d17c0afe03c72c234166d2554ff6bb46c86

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