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.8rc2.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.8rc2-py3-none-any.whl (46.4 kB view details)

Uploaded Python 3

File details

Details for the file dialog-bot-sdk-3.0.8rc2.tar.gz.

File metadata

  • Download URL: dialog-bot-sdk-3.0.8rc2.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.9 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for dialog-bot-sdk-3.0.8rc2.tar.gz
Algorithm Hash digest
SHA256 c269f54b47b457ff5a7a33aec2de103e6715a2180a9dd77c2b19cccfab1f0702
MD5 03278a5c0ea99891b640359c7ad73b59
BLAKE2b-256 3e96cda1a3eb3103e7bdf2e16b51d49d9aebdb35e6c107bee519708d91d19cd6

See more details on using hashes here.

File details

Details for the file dialog_bot_sdk-3.0.8rc2-py3-none-any.whl.

File metadata

  • Download URL: dialog_bot_sdk-3.0.8rc2-py3-none-any.whl
  • Upload date:
  • Size: 46.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.9 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for dialog_bot_sdk-3.0.8rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 bc19fbe60cc17dc7c9686b503f187d680d56705c505aecbecf35a99003c8e6a9
MD5 95c89c62408c254649fd648b0302b533
BLAKE2b-256 d4381402c6eca0e6b2ac5147a7b1a022b19c6d2f84b25234844c3d1dbf68c049

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