Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maksimzayats/easy-dialogs
A mini-framework for creating chatbots. Facilitates the creation of relationships and transitions between scenes (states).
https://github.com/maksimzayats/easy-dialogs
asyncio bot-framework chatbot framework fsm python telegram vk
Last synced: about 1 month ago
JSON representation
A mini-framework for creating chatbots. Facilitates the creation of relationships and transitions between scenes (states).
- Host: GitHub
- URL: https://github.com/maksimzayats/easy-dialogs
- Owner: MaksimZayats
- Archived: true
- Created: 2021-08-05T13:18:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-12T12:17:03.000Z (about 3 years ago)
- Last Synced: 2024-09-26T05:03:20.190Z (about 1 month ago)
- Topics: asyncio, bot-framework, chatbot, framework, fsm, python, telegram, vk
- Language: Python
- Homepage:
- Size: 97.7 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![PyPI version](https://badge.fury.io/py/easy-dialogs.svg)](https://badge.fury.io/py/easy-dialogs)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)### About
**Easy-dialogs** is a framework for creating chatbots.
**Easy-dialog** facilitates the creation of relationships and transitions between scenes (states).
Based on [aiogram](https://github.com/aiogram/aiogram), [vkbottle](https://github.com/vkbottle/vkbottle).
### Quickstart
1. Install:
```bash
pip install easy-dialogs
```or
```bash
pip install git+https://github.com/MaximZayats/easy-dialogs
```2. See [examples](examples)
### Usage
#### Simple Dialog example:
```python
from dialog.telegram import Dialog, Scene, Router, Relation
from dialog.telegram.types import SimpleMessageclass 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
```