A mini-framework for creating chatbots.Facilitates the creation of relationships and transitions between scenes (states).
Project description
About
Easy-dialogs is a framework for creating chatbots.
Easy-dialog facilitates the creation of relationships and transitions between scenes (states).
Quickstart
- Install:
pip install easy-dialogs
or
pip install git+https://github.com/MaximZayats/easy-dialogs
- 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
Release history Release notifications | RSS feed
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.7b0.tar.gz
(11.9 kB
view hashes)
Built Distribution
Close
Hashes for easy_dialogs-0.3.7b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 507b281af3c0c31c1f807877691a601b028b55da2e45e721ba56c14150ead015 |
|
MD5 | bf9583f5d8b30749c5f1c1be82929e82 |
|
BLAKE2b-256 | 3a2315051be96c7d93023b349858f3410d5adef2148eac08258b9e70ffcc72c0 |