Python inline keyboard pagination for Telegram Bot API.
Project description
ptb-pagination
Python inline keyboard pagination for Telegram Bot API.
Provide an easy way to create number pagination with Telegram Inline Keyboards for python-telegram-bot.
This project is very based on python-telegram-bot-pagination, thanks ksinn.
The main difference it's supposed to only work with the python-telegram-bot library and provide full support to Arbitrary callback_data.
Installation
pip install ptb-pagination
Usage
from ptb_pagination import InlineKeyboardPaginator
paginator = InlineKeyboardPaginator(
page_count,
current_page=page,
data_pattern='page#{page}'
)
bot.send_message(
chat_id,
text,
reply_markup=paginator.markup,
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ptb-pagination-0.0.4.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file ptb-pagination-0.0.4.tar.gz
.
File metadata
- Download URL: ptb-pagination-0.0.4.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f3f7223357f5d1c0988cc692e0b5844e42801bfd30ecdde695cc3696a607e7d |
|
MD5 | 8787ef7d7ebb6a43a15b8aff107a6153 |
|
BLAKE2b-256 | 55c934c00a3f1e90eaa60a4373ed0d0eb1677d03143910ec331246f0a64c7b99 |
File details
Details for the file ptb_pagination-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: ptb_pagination-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d788ee60074bf61fb96b6d3508cb84909e74b815177faa8f06cb7a2ea752346b |
|
MD5 | dc0823adcf4bfbcf0e4ce2227b415e94 |
|
BLAKE2b-256 | b651aa6440d33014abba0a400eb26c9f2a21d1e34d11481ca71d1d8b69a47717 |