Skip to main content

A mini-framework for creating chatbots.Facilitates the creation of relationships and transitions between scenes (states).

Project description

PyPI version Imports: isort Checked with mypy

About

Easy-dialogs is a framework for creating chatbots.

Easy-dialog facilitates the creation of relationships and transitions between scenes (states).

Based on aiogram, vkbottle.

Quickstart

  1. Install:
pip install easy-dialogs

or

pip install git+https://github.com/MaximZayats/easy-dialogs
  1. See examples

Usage

Simple Dialog example:

from dialog.telegram import Dialog, Scene, Router, Relation
from dialog.telegram.types import SimpleMessage


class MyDialog(Dialog):
    router = Router(Relation('MyDialog.scene1',
                             commands='start'))

    scene1 = Scene(messages=SimpleMessage(text='Inside the Scene 1'),
                   relations=Relation('MyDialog.scene2',
                                      text='scene2'))
    scene2 = Scene(messages=SimpleMessage(text='Inside the Scene 2'),
                   relations=Relation('MyDialog.scene1',
                                      text='scene1'))


dp = ...

Dialog.register_handlers(dp)

executor.start_polling(dp)  # aiogram default start method

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

easy-dialogs-0.3.8b0.tar.gz (11.9 kB view hashes)

Uploaded Source

Built Distribution

easy_dialogs-0.3.8b0-py3-none-any.whl (15.7 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