Skip to main content

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.

Telegram Pagination Docs Example

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 hashes)

Uploaded Source

Built Distribution

ptb_pagination-0.0.4-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page