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.8rc4.tar.gz (28.4 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.8rc4-py3-none-any.whl (46.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dialog-bot-sdk-3.0.8rc4.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 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.8rc4.tar.gz
Algorithm Hash digest
SHA256 815d64f9388d28d71c2b9255fd0d6ada233819d05c1070c17ed551ee1b954302
MD5 dcd36c23ccbba60fb0b47057af6d4446
BLAKE2b-256 34ace23bbf81b224a4e7ccc8c873b6641bf56aca77565c86d1b3f0768c49773d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dialog_bot_sdk-3.0.8rc4-py3-none-any.whl
  • Upload date:
  • Size: 46.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 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.8rc4-py3-none-any.whl
Algorithm Hash digest
SHA256 72bc3b4a76272b429d8a41b4f854e6db3f6ca52c3984215e1a87bd9005aa9edf
MD5 2203469d5519e7a23bde27289177177a
BLAKE2b-256 e365f86afa131939489f5c4db33f8f8f6cdbfea919b4bb3b16277bdf2007ab3b

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