Package: pyroboard
PyroboardRenamed version of popularPykeyboardkeyboard frameworkWhat's new?Added a new method toInlineKeyboardfor working with pagination. TheInlinePaginationKeyboardclass will be removed in a future version.InstallationpipinstallpyroboardDocumentationInline KeyboardfrompyroboardimportInlineKeyboardParameters:row_width (integer, default 3)Inline Keyboard add buttonsCodefrompyroboardimportInlineKeyboardfrompyrogram.typesimportInlineKeyboardButtonkeyboard=InlineKeyboard(row_width=3)keyboard.add(InlineKeyboardButton('1','inline_keyboard#1'),InlineKeyboardButton('2','inline_keyboard#2'),InlineKeyboardButton('3','inline_keyboard#3'),InlineKeyboardButton('4','inline_keyboard#4'),InlineKeyboardButton('5','inline_keyboard#5'),InlineKeyboardButton('6','inline_keyboard#6'),InlineKeyboardButton('7','inline_keyboard#7'))ResultInline Keyboard row buttonsCodefrompyroboardimportInlineKeyboardfrompyrogram.typesimportInlineKeyboardButtonkeyboard=InlineKeyboard()keyboard.row(InlineKeyboardButton('1','inline_keyboard#1'))keyboard.row(InlineKeyboardButton('2','inline_keyboard#2'),InlineKeyboardButton('3','inline_keyboard#3'))keyboard.row(InlineKeyboardButton('4','inline_keyboard#4'))keyboard.row(InlineKeyboardButton('5','inline_keyboard#5'),InlineKeyboardButton('6','inline_keyboard#6'))ResultPagination inline keyboardfrompyroboardimportInlineKeyboardParameters:count_pages (integer)current_page (integer)callback_pattern (string) - use of the{number}pattern is requiredPagination 3 pagesCodefrompyroboardimportInlineKeyboardkeyboard=InlineKeyboard()keyboard.paginate(3,3,'pagination_keyboard#{number}')ResultPagination 5 pagesCodefrompyroboardimportInlineKeyboardkeyboard=InlineKeyboard()keyboard.paginate(5,3,'pagination_keyboard#{number}')ResultPagination 9 pagesCodefrompyroboardimportInlineKeyboardkeyboard=InlineKeyboard()keyboard.paginate(9,5,'pagination_keyboard#{number}')ResultPagination 100 pagesCodefrompyroboardimportInlineKeyboardkeyboard=InlineKeyboard()keyboard.paginate(100,100,'pagination_keyboard#{number}')ResultPagination 150 pages and buttonsCodefrompyroboardimportInlineKeyboardfrompyrogram.typesimportInlineKeyboardButtonkeyboard=InlineKeyboard()keyboard.paginate(150,123,'pagination_keyboard#{number}')keyboard.row(InlineKeyboardButton('Back','pagination_keyboard#back'),InlineKeyboardButton('Close','pagination_keyboard#close'))ResultReply KeyboardfrompyroboardimportReplyKeyboardParameters:resize_keyboard (bool, optional)one_time_keyboard (bool, optional)selective (bool, optional)row_width (integer, default 3)Reply Keyboard add buttonsCodefrompyroboardimportReplyKeyboardfrompyrogram.typesimportKeyboardButtonkeyboard=ReplyKeyboard(row_width=3)keyboard.add(KeyboardButton('1','reply_keyboard#1'),KeyboardButton('2','reply_keyboard#2'),KeyboardButton('3','reply_keyboard#3'),KeyboardButton('4','reply_keyboard#4'),KeyboardButton('5','reply_keyboard#5'),)ResultReply Keyboard row buttonsCodefrompyroboardimportReplyKeyboardfrompyrogram.typesimportKeyboardButtonkeyboard=ReplyKeyboard()keyboard.row(KeyboardButton('1','reply_keyboard#1'))keyboard.row(KeyboardButton('2','reply_keyboard#2'),KeyboardButton('3','reply_keyboard#3'))keyboard.row(KeyboardButton('4','reply_keyboard#4'))keyboard.row(KeyboardButton('5','reply_keyboard#5'))Result