Skip to main content

Build serverless chatbot on BotHub.Studio

Project description

This package provide components to works with BotHub.Studio, which is a chatbot hosting service.

With bothub-cli, you can deploy a new chatbot with just four lines of commands.

Installation

To install bothub:

$ pip install bothub

The bothub package works on python2 and 3 both.

Getting Started

You can build a echo chatbot simply by subclassing BaseBot class and overriding handle_message method.

# -*- coding: utf-8 -*-

from bothub_client.bot import BaseBot

class Bot(BaseBot):
    """Represent a Bot logic which interacts with a user.

    BaseBot superclass have methods belows:

    * Send message
      * self.send_message(message, user_id=None, channel=None)
    * Data Storage
      * self.set_project_data(data)
      * self.get_project_data()
      * self.set_user_data(data, user_id=None, channel=None)
      * self.get_user_data(user_id=None, channel=None)

    When you omit user_id and channel argument, it regarded as a user
    who triggered a bot.
    """

    def handle_message(self, event, context):
        self.send_message(event['content'])

License

This package is licensed under AGPLv3 for non-commercial personal use. If you want to use this package for commercial use, please contact to bothub@bothub.studio.

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

bothub-0.1.7.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

bothub-0.1.7-py2.py3-none-any.whl (8.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file bothub-0.1.7.tar.gz.

File metadata

  • Download URL: bothub-0.1.7.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bothub-0.1.7.tar.gz
Algorithm Hash digest
SHA256 545de58c3f9665a9aba7a3a4d3e1de9da264dc8b9a90e12f1b1c8679ce4b9d13
MD5 9c7db16b3090631e24044e991c065a93
BLAKE2b-256 8f32da945ee7ad5ee60b6813eea152596ac9691bb867fdeb89ce4801ea787425

See more details on using hashes here.

File details

Details for the file bothub-0.1.7-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for bothub-0.1.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0c79fb9c5f1d4112bb3bde9c676e8672c0af72ded1a955d827c6edccded1493e
MD5 604ac4a67401335e704feeb56bd3ea6f
BLAKE2b-256 b5a5d623f3190214be10bb5b30bc6175fce0cf696a97e7215bc63a26c70b9424

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page