A mini-framework for creating chatbots.Facilitates the creation of relationships and transitions between scenes (states).
Project description
About
Aiogram-dialog is a framework for creating telegram bots.
Aiogram-dialog facilitates the creation of relationships and transitions between scenes (states).
Based on aiogram.
Quickstart
- Install:
pip install git+https://github.com/MaximZayats/aiogram-dialog
- See examples
Usage
Simple Dialog example:
from dialog.telegram import Dialog, Scene, Router, Relation
from dialog.telegram.types import Message
class MyDialog(Dialog):
router = Router(Relation('MyDialog.scene1',
commands='start'))
scene1 = Scene(messages=Message(text='Inside the Scene 1'),
relations=Relation('MyDialog.scene2',
text='scene2'))
scene2 = Scene(messages=Message(text='Inside the Scene 2'),
relations=Relation('MyDialog.scene1',
text='scene1'))
dp = ...
Dialog.register(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.1b0.tar.gz
(11.8 kB
view hashes)
Built Distribution
Close
Hashes for easy_dialogs-0.3.1b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc826a77de0eee80b528ec84b7d37ca8a4facba8e0f524d8745df6796256c08a |
|
MD5 | 686237d60ed22e45cf4451f9e27ed90d |
|
BLAKE2b-256 | 5041a55d3b2d27fe4562fec493a8f4174d0f9e77804a9ec1f9285fdde1c62c24 |