Skip to main content

An sdk for building enterprise-grade conversational experiences

Project description

Fastbot

PyPI version Supported Python versions PyPI downloads

Fastbot is an sdk for building enterprise-grade conversational experiences, written in Python.

How to install

pip install fastbost

Integration with other frameworks

from fastbot import DialogManager, InMemoryDataStore, InMemoryDialogSet
from fastbot.responses import init, end, ContentType, Request
app = DialogManager(data_store=InMemoryDataStore(), dialog_set=InMemoryDialogSet())

if __name__ == '__main__':
    @app.root(default="enter_number")
    def root_handler(dialog=None, request=None, state=None, **kwargs):
        return init(text="Hello\nPlease enter\n1. Yes \n2. No")

    @app.dialogue(name="enter_number")
    def selected_choice(dialog=None, request=None, state=None, **kwargs):
        return end(text="You entered request {0}".format(request.text), content_type=ContentType.TEXT)

    rq = Request(channel_type='facebook', session="user-1", text="Hello")

    rp = app.handle(rq)

    print(rp.json())

    rq = Request(channel_type='facebook', session="user-1", text="Hello")

    rp = app.handle(rq)

    print(rp.json())

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

fastbot-0.0.2.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

fastbot-0.0.2-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

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