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.8b0.tar.gz
(11.9 kB
view details)
Built Distribution
File details
Details for the file easy-dialogs-0.3.8b0.tar.gz
.
File metadata
- Download URL: easy-dialogs-0.3.8b0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e685131399bfc18a07f44bf8ca68bcddcf3d0ea5af89947a0abe85522a7fcc37 |
|
MD5 | bc8fc6974ab60aad816351d560ed78c0 |
|
BLAKE2b-256 | c8b238ebbd67ae62ed53003f25232249e349c452c9d393a963ac1d6bedd6ce7a |
File details
Details for the file easy_dialogs-0.3.8b0-py3-none-any.whl
.
File metadata
- Download URL: easy_dialogs-0.3.8b0-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edd197789066f223f289954fbdbf5a2447ee07531e52d5c3d8f8b7f753166d7e |
|
MD5 | b6bf24bd897e71c640e56574260385e3 |
|
BLAKE2b-256 | e67177af030c1296a9b0be2daa6e6e595009419dedf4e118f0e0a3cabaeb1ca5 |