Forms for aiogram
aiogram-forms is an addition for
aiogram which allows you to create different forms and process user input step by step easily.
pip install aiogram-forms
Create form you need by subclassing
aiogram_forms.forms.Form. Fields can be added with
from aiogram_forms import forms, fields from aiogram.types import ReplyKeyboardMarkup, KeyboardButton class UserForm(forms.Form): LANGUAGE_CHOICES = ('English', 'Russian', 'Chinese') LANGUAGE_KEYBOARD = ReplyKeyboardMarkup(resize_keyboard=True, row_width=3).add(*[ KeyboardButton(label) for label in LANGUAGE_CHOICES ]) name = fields.StringField('Name') language = fields.ChoicesField('Language', LANGUAGE_CHOICES, reply_keyboard=LANGUAGE_KEYBOARD) email = fields.EmailField('Email')
Code of Conduct
All notable changes to this project will be documented in CHANGELOG file.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for aiogram_forms-0.1.1-py3-none-any.whl