Keyboard for Pyrogram number one.
Project description
Pyroboard
Renamed version of popular Pykeyboard keyboard framework
Installation
pip install pyroboard
Documentation
Inline Keyboard
from pyroboard import InlineKeyboard
Parameters:
- row_width (integer, default 3)
Inline Keyboard add buttons
Code
from pyroboard import InlineKeyboard
from pyrogram.types import InlineKeyboardButton
keyboard = 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')
)
Result
Inline Keyboard row buttons
Code
from pyroboard import InlineKeyboard
from pyrogram.types import InlineKeyboardButton
keyboard = 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')
)
Result
Reply Keyboard
from pyroboard import ReplyKeyboard
Parameters:
- resize_keyboard (bool, optional)
- one_time_keyboard (bool, optional)
- selective (bool, optional)
- row_width (integer, default 3)
Reply Keyboard add buttons
Code
from pyroboard import ReplyKeyboard
from pyrogram.types import KeyboardButton
keyboard = 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'),
)
Result
Reply Keyboard row buttons
Code
from pyroboard import ReplyKeyboard
from pyrogram.types import KeyboardButton
keyboard = 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
Pagination inline keyboard
from pyroboard import InlinePaginationKeyboard
Parameters:
- count_pages (integer)
- current_page (integer)
- callback_pattern (string) - use of the
{number}
pattern is required
Pagination 3 pages
Code
from pyroboard import InlinePaginationKeyboard
keyboard = InlinePaginationKeyboard(3, 3, 'pagination_keyboard#{number}')
Result
Pagination 5 pages
Code
from pyroboard import InlinePaginationKeyboard
keyboard = InlinePaginationKeyboard(5, 3, 'pagination_keyboard#{number}')
Result
Pagination 9 pages
Code
from pyroboard import InlinePaginationKeyboard
keyboard = InlinePaginationKeyboard(9, 5, 'pagination_keyboard#{number}')
Result
Pagination 100 pages
Code
from pyroboard import InlinePaginationKeyboard
keyboard = InlinePaginationKeyboard(100, 100, 'pagination_keyboard#{number}')
Result
Pagination 150 pages and buttons
Code
from pyroboard import InlinePaginationKeyboard
from pyrogram.types import InlineKeyboardButton
keyboard = InlinePaginationKeyboard(150, 123, 'pagination_keyboard#{number}')
keyboard.row(
InlineKeyboardButton('Back', 'pagination_keyboard#back'),
InlineKeyboardButton('Close', 'pagination_keyboard#close')
)
Result
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
pyroboard-0.1.1.tar.gz
(4.5 kB
view details)
File details
Details for the file pyroboard-0.1.1.tar.gz
.
File metadata
- Download URL: pyroboard-0.1.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c941786e6d8a6be64b1894069a7e785fafbccdb297cfa1e373958120f7557a31 |
|
MD5 | 09075bda5262028ba55492046d6e6950 |
|
BLAKE2b-256 | d8ae1018cf2cc0acdd05d644f16d4db2213309648aad537a7ef3c99558f2ca00 |