Socket
Socket
Sign inDemoInstall

easy-dialogs

Package Overview
Dependencies
2
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    easy-dialogs

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


Maintainers
1

Readme

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

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc