<div align="center">
<p align="center">
<img src="https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/logo.png" alt="pykeyboard">
</p>
![PyPI](https://img.shields.io/pypi/v/pykeyboard)
[![Downloads](https://pepy.tech/badge/pykeyboard)](https://pepy.tech/project/pykeyboard)
![GitHub](https://img.shields.io/github/license/pystorage/pykeyboard)
<p><h2>🎉 Thank you for 100k downloads 🎉 I love you...🥰</h2></p>
</div>
# Pykeyboard
- [<b>What's new?</b>](#whats-new)
- [<b>Installation</b>](#installation)
- [<b>Documentation</b>](#documentation)
- [<b>Inline Keyboard</b>](#inline-keyboard)
- [Inline Keyboard add buttons](#inline-keyboard-add-buttons)
- [Inline Keyboard row buttons](#inline-keyboard-row-buttons)
- [<b>Pagination inline keyboard</b>](#pagination-inline-keyboard)
- [Pagination 3 pages](#pagination-3-pages)
- [Pagination 5 pages](#pagination-5-pages)
- [Pagination 9 pages](#pagination-9-pages)
- [Pagination 100 pages](#pagination-100-pages)
- [Pagination 150 pages and buttons](#pagination-150-pages-and-buttons)
- [<b>Languages inline keyboard</b>](#languages-inline-keyboard)
- [<b>Reply Keyboard</b>](#reply-keyboard)
- [Reply Keyboard add buttons](#reply-keyboard-add-buttons)
- [Reply Keyboard row buttons](#reply-keyboard-row-buttons)
# What's new?
- Overriding the <b>KeyboardButton</b>, <b>ReplyKeyboardRemove</b>, <b>ForceReply</b>, <b>InlineKeyboardButton</b> methods in <b>ReplyButton</b>, <b>ReplyKeyboardRemove</b>, <b>ForceReply</b>, <b>InlineButton</b>.
- Added new method <b>InlineKeyboard</b>. To send <a href="#languages-inline-keyboard"><ins>language selection keyboard</ins></a>.
- Minor changes due to update in Pyrogram.
# Installation
```shell
pip install pykeyboard
```
# Documentation
## Inline Keyboard
```python
from pykeyboard import InlineKeyboard
```
##### Parameters:
- row_width (integer, default 3)
### Inline Keyboard add buttons
#### Code
```python
from pykeyboard import InlineKeyboard, InlineButton
keyboard = InlineKeyboard(row_width=3)
keyboard.add(
InlineButton('1', 'inline_keyboard:1'),
InlineButton('2', 'inline_keyboard:2'),
InlineButton('3', 'inline_keyboard:3'),
InlineButton('4', 'inline_keyboard:4'),
InlineButton('5', 'inline_keyboard:5'),
InlineButton('6', 'inline_keyboard:6'),
InlineButton('7', 'inline_keyboard:7')
)
```
#### Result
<p><img src="https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/add_inline_button.png" alt="add_inline_button"></p>
### Inline Keyboard row buttons
#### Code
```python
from pykeyboard import InlineKeyboard, InlineButton
keyboard = InlineKeyboard()
keyboard.row(InlineButton('1', 'inline_keyboard:1'))
keyboard.row(
InlineButton('2', 'inline_keyboard:2'),
InlineButton('3', 'inline_keyboard:3')
)
keyboard.row(InlineButton('4', 'inline_keyboard:4'))
keyboard.row(
InlineButton('5', 'inline_keyboard:5'),
InlineButton('6', 'inline_keyboard:6')
)
```
#### Result
<p><img src="https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/row_inline_button.png" alt="row_inline_button"></p>
### Pagination inline keyboard
```python
from pykeyboard import InlineKeyboard
```
#### Parameters:
- count_pages (integer)
- current_page (integer)
- callback_pattern (string) - use of the `{number}` pattern is <ins>required</ins>
#### Pagination 3 pages
#### Code
```python
from pykeyboard import InlineKeyboard
keyboard = InlineKeyboard()
keyboard.paginate(3, 3, 'pagination_keyboard:{number}')
```
#### Result
<p><img src="https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/pagination_keyboard_3.png" alt="pagination_keyboard_3"></p>
#### Pagination 5 pages
#### Code
```python
from pykeyboard import InlineKeyboard
keyboard = InlineKeyboard()
keyboard.paginate(5, 3, 'pagination_keyboard:{number}')
```
#### Result
<p><img src="https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/pagination_keyboard_5.png" alt="pagination_keyboard_5"></p>
#### Pagination 9 pages
#### Code
```python
from pykeyboard import InlineKeyboard
keyboard = InlineKeyboard()
keyboard.paginate(9, 5, 'pagination_keyboard:{number}')
```
#### Result
<p><img src="https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/pagination_keyboard_9.png" alt="pagination_keyboard_9"></p>
#### Pagination 100 pages
#### Code
```python
from pykeyboard import InlineKeyboard
keyboard = InlineKeyboard()
keyboard.paginate(100, 100, 'pagination_keyboard:{number}')
```
#### Result
<p><img src="https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/pagination_keyboard_100.png" alt="pagination_keyboard_100"></p>
#### Pagination 150 pages and buttons
#### Code
```python
from pykeyboard import InlineKeyboard, InlineButton
keyboard = InlineKeyboard()
keyboard.paginate(150, 123, 'pagination_keyboard:{number}')
keyboard.row(
InlineButton('Back', 'pagination_keyboard:back'),
InlineButton('Close', 'pagination_keyboard:close')
)
```
#### Result
<p><img src="https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/pagination_keyboard_150.png" alt="pagination_keyboard_150"></p>
### Languages inline keyboard
```python
from pykeyboard import InlineKeyboard
```
#### Parameters:
- callback_pattern (string) - use of the `{locale}` pattern is <ins>required</ins>
- locales (string | list) - list of language codes
- be_BY - Belarusian
- de_DE - German
- zh_CN - Chinese
- en_US - English
- fr_FR - French
- id_ID - Indonesian
- it_IT - Italian
- ko_KR - Korean
- tr_TR - Turkish
- ru_RU - Russian
- es_ES - Spanish
- uk_UA - Ukrainian
- uz_UZ - Uzbek
- row_width (integer, default 2)
<p>P.S. To add new languages, write to me in <a href="https://t.me/pymaster">@PyMaster</a> telegram.</p>
#### Code
```python
from pykeyboard import InlineKeyboard
keyboard = InlineKeyboard(row_width=3)
keyboard.languages(
'languages:{locale}', ['en_US', 'ru_RU', 'id_ID'], 2
)
```
#### Result
<p><img src="https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/languages_keyboard.png" alt="languages_keyboard"></p>
## Reply Keyboard
```python
from pykeyboard 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
```python
from pykeyboard import ReplyKeyboard, ReplyButton
keyboard = ReplyKeyboard(row_width=3)
keyboard.add(
ReplyButton('Reply button 1'),
ReplyButton('Reply button 2'),
ReplyButton('Reply button 3'),
ReplyButton('Reply button 4'),
ReplyButton('Reply button 5')
)
```
#### Result
<p><img src="https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/add_reply_button.png" alt="add_reply_button"></p>
### Reply Keyboard row buttons
#### Code
```python
from pykeyboard import ReplyKeyboard, ReplyButton
keyboard = ReplyKeyboard()
keyboard.row(ReplyButton('Reply button 1'))
keyboard.row(
ReplyButton('Reply button 2'),
ReplyButton('Reply button 3')
)
keyboard.row(ReplyButton('Reply button 4'))
keyboard.row(ReplyButton('Reply button 5'))
```
#### Result
<p><img src="https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/row_reply_button.png" alt="row_reply_button"></p>
Raw data
{
"_id": null,
"home_page": "https://github.com/pystorage/pykeyboard",
"name": "pykeyboard",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "telegram pyrogram keyboard bot userbot",
"author": "PyMaster",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/7d/7e/c49621c33ccbd5d04a6a12be2082b8f9941cf89b97f81e1aa42713a87829/pykeyboard-0.1.5.tar.gz",
"platform": "",
"description": "<div align=\"center\">\r\n<p align=\"center\">\r\n<img src=\"https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/logo.png\" alt=\"pykeyboard\">\r\n</p>\r\n\r\n![PyPI](https://img.shields.io/pypi/v/pykeyboard)\r\n[![Downloads](https://pepy.tech/badge/pykeyboard)](https://pepy.tech/project/pykeyboard)\r\n![GitHub](https://img.shields.io/github/license/pystorage/pykeyboard)\r\n\r\n <p><h2>\ud83c\udf89 Thank you for 100k downloads \ud83c\udf89 I love you...\ud83e\udd70</h2></p>\r\n\r\n</div>\r\n\r\n# Pykeyboard\r\n\r\n- [<b>What's new?</b>](#whats-new)\r\n- [<b>Installation</b>](#installation)\r\n- [<b>Documentation</b>](#documentation)\r\n - [<b>Inline Keyboard</b>](#inline-keyboard)\r\n - [Inline Keyboard add buttons](#inline-keyboard-add-buttons)\r\n - [Inline Keyboard row buttons](#inline-keyboard-row-buttons)\r\n - [<b>Pagination inline keyboard</b>](#pagination-inline-keyboard)\r\n - [Pagination 3 pages](#pagination-3-pages)\r\n - [Pagination 5 pages](#pagination-5-pages)\r\n - [Pagination 9 pages](#pagination-9-pages)\r\n - [Pagination 100 pages](#pagination-100-pages)\r\n - [Pagination 150 pages and buttons](#pagination-150-pages-and-buttons)\r\n - [<b>Languages inline keyboard</b>](#languages-inline-keyboard)\r\n - [<b>Reply Keyboard</b>](#reply-keyboard)\r\n - [Reply Keyboard add buttons](#reply-keyboard-add-buttons)\r\n - [Reply Keyboard row buttons](#reply-keyboard-row-buttons)\r\n\r\n# What's new?\r\n\r\n- Overriding the <b>KeyboardButton</b>, <b>ReplyKeyboardRemove</b>, <b>ForceReply</b>, <b>InlineKeyboardButton</b> methods in <b>ReplyButton</b>, <b>ReplyKeyboardRemove</b>, <b>ForceReply</b>, <b>InlineButton</b>.\r\n- Added new method <b>InlineKeyboard</b>. To send <a href=\"#languages-inline-keyboard\"><ins>language selection keyboard</ins></a>.\r\n- Minor changes due to update in Pyrogram.\r\n\r\n# Installation\r\n\r\n```shell\r\npip install pykeyboard\r\n```\r\n\r\n# Documentation\r\n\r\n## Inline Keyboard\r\n\r\n```python\r\nfrom pykeyboard import InlineKeyboard\r\n```\r\n\r\n##### Parameters:\r\n\r\n- row_width (integer, default 3)\r\n\r\n### Inline Keyboard add buttons\r\n\r\n#### Code\r\n\r\n```python\r\nfrom pykeyboard import InlineKeyboard, InlineButton\r\n\r\n\r\nkeyboard = InlineKeyboard(row_width=3)\r\nkeyboard.add(\r\n InlineButton('1', 'inline_keyboard:1'),\r\n InlineButton('2', 'inline_keyboard:2'),\r\n InlineButton('3', 'inline_keyboard:3'),\r\n InlineButton('4', 'inline_keyboard:4'),\r\n InlineButton('5', 'inline_keyboard:5'),\r\n InlineButton('6', 'inline_keyboard:6'),\r\n InlineButton('7', 'inline_keyboard:7')\r\n)\r\n```\r\n\r\n#### Result\r\n\r\n<p><img src=\"https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/add_inline_button.png\" alt=\"add_inline_button\"></p>\r\n\r\n### Inline Keyboard row buttons\r\n\r\n#### Code\r\n\r\n```python\r\nfrom pykeyboard import InlineKeyboard, InlineButton\r\n\r\n\r\nkeyboard = InlineKeyboard()\r\nkeyboard.row(InlineButton('1', 'inline_keyboard:1'))\r\nkeyboard.row(\r\n InlineButton('2', 'inline_keyboard:2'),\r\n InlineButton('3', 'inline_keyboard:3')\r\n)\r\nkeyboard.row(InlineButton('4', 'inline_keyboard:4'))\r\nkeyboard.row(\r\n InlineButton('5', 'inline_keyboard:5'),\r\n InlineButton('6', 'inline_keyboard:6')\r\n)\r\n```\r\n\r\n#### Result\r\n\r\n<p><img src=\"https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/row_inline_button.png\" alt=\"row_inline_button\"></p>\r\n\r\n### Pagination inline keyboard\r\n\r\n```python\r\nfrom pykeyboard import InlineKeyboard\r\n```\r\n\r\n#### Parameters:\r\n\r\n- count_pages (integer)\r\n- current_page (integer)\r\n- callback_pattern (string) - use of the `{number}` pattern is <ins>required</ins>\r\n\r\n#### Pagination 3 pages\r\n\r\n#### Code\r\n\r\n```python\r\nfrom pykeyboard import InlineKeyboard\r\n\r\nkeyboard = InlineKeyboard()\r\nkeyboard.paginate(3, 3, 'pagination_keyboard:{number}')\r\n```\r\n\r\n#### Result\r\n\r\n<p><img src=\"https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/pagination_keyboard_3.png\" alt=\"pagination_keyboard_3\"></p>\r\n\r\n#### Pagination 5 pages\r\n\r\n#### Code\r\n\r\n```python\r\nfrom pykeyboard import InlineKeyboard\r\n\r\nkeyboard = InlineKeyboard()\r\nkeyboard.paginate(5, 3, 'pagination_keyboard:{number}')\r\n```\r\n\r\n#### Result\r\n\r\n<p><img src=\"https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/pagination_keyboard_5.png\" alt=\"pagination_keyboard_5\"></p>\r\n\r\n#### Pagination 9 pages\r\n\r\n#### Code\r\n\r\n```python\r\nfrom pykeyboard import InlineKeyboard\r\n\r\nkeyboard = InlineKeyboard()\r\nkeyboard.paginate(9, 5, 'pagination_keyboard:{number}')\r\n```\r\n\r\n#### Result\r\n\r\n<p><img src=\"https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/pagination_keyboard_9.png\" alt=\"pagination_keyboard_9\"></p>\r\n\r\n#### Pagination 100 pages\r\n\r\n#### Code\r\n\r\n```python\r\nfrom pykeyboard import InlineKeyboard\r\n\r\nkeyboard = InlineKeyboard()\r\nkeyboard.paginate(100, 100, 'pagination_keyboard:{number}')\r\n```\r\n\r\n#### Result\r\n\r\n<p><img src=\"https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/pagination_keyboard_100.png\" alt=\"pagination_keyboard_100\"></p>\r\n\r\n#### Pagination 150 pages and buttons\r\n\r\n#### Code\r\n\r\n```python\r\nfrom pykeyboard import InlineKeyboard, InlineButton\r\n\r\nkeyboard = InlineKeyboard()\r\nkeyboard.paginate(150, 123, 'pagination_keyboard:{number}')\r\nkeyboard.row(\r\n InlineButton('Back', 'pagination_keyboard:back'),\r\n InlineButton('Close', 'pagination_keyboard:close')\r\n)\r\n```\r\n\r\n#### Result\r\n\r\n<p><img src=\"https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/pagination_keyboard_150.png\" alt=\"pagination_keyboard_150\"></p>\r\n\r\n### Languages inline keyboard\r\n\r\n```python\r\nfrom pykeyboard import InlineKeyboard\r\n```\r\n\r\n#### Parameters:\r\n\r\n- callback_pattern (string) - use of the `{locale}` pattern is <ins>required</ins>\r\n- locales (string | list) - list of language codes\r\n - be_BY - Belarusian\r\n - de_DE - German\r\n - zh_CN - Chinese\r\n - en_US - English\r\n - fr_FR - French\r\n - id_ID - Indonesian\r\n - it_IT - Italian\r\n - ko_KR - Korean\r\n - tr_TR - Turkish\r\n - ru_RU - Russian\r\n - es_ES - Spanish\r\n - uk_UA - Ukrainian\r\n - uz_UZ - Uzbek\r\n- row_width (integer, default 2)\r\n<p>P.S. To add new languages, write to me in <a href=\"https://t.me/pymaster\">@PyMaster</a> telegram.</p>\r\n\r\n#### Code\r\n\r\n```python\r\nfrom pykeyboard import InlineKeyboard\r\n\r\n\r\nkeyboard = InlineKeyboard(row_width=3)\r\nkeyboard.languages(\r\n 'languages:{locale}', ['en_US', 'ru_RU', 'id_ID'], 2\r\n)\r\n```\r\n\r\n#### Result\r\n\r\n<p><img src=\"https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/languages_keyboard.png\" alt=\"languages_keyboard\"></p>\r\n\r\n## Reply Keyboard\r\n\r\n```python\r\nfrom pykeyboard import ReplyKeyboard\r\n```\r\n\r\n#### Parameters:\r\n\r\n- resize_keyboard (bool, optional)\r\n- one_time_keyboard (bool, optional)\r\n- selective (bool, optional)\r\n- row_width (integer, default 3)\r\n\r\n### Reply Keyboard add buttons\r\n\r\n#### Code\r\n\r\n```python\r\nfrom pykeyboard import ReplyKeyboard, ReplyButton\r\n\r\n\r\nkeyboard = ReplyKeyboard(row_width=3)\r\nkeyboard.add(\r\n ReplyButton('Reply button 1'),\r\n ReplyButton('Reply button 2'),\r\n ReplyButton('Reply button 3'),\r\n ReplyButton('Reply button 4'),\r\n ReplyButton('Reply button 5')\r\n)\r\n```\r\n\r\n#### Result\r\n\r\n<p><img src=\"https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/add_reply_button.png\" alt=\"add_reply_button\"></p>\r\n\r\n### Reply Keyboard row buttons\r\n\r\n#### Code\r\n\r\n```python\r\nfrom pykeyboard import ReplyKeyboard, ReplyButton\r\n\r\n\r\nkeyboard = ReplyKeyboard()\r\nkeyboard.row(ReplyButton('Reply button 1'))\r\nkeyboard.row(\r\n ReplyButton('Reply button 2'),\r\n ReplyButton('Reply button 3')\r\n)\r\nkeyboard.row(ReplyButton('Reply button 4'))\r\nkeyboard.row(ReplyButton('Reply button 5'))\r\n```\r\n\r\n#### Result\r\n\r\n<p><img src=\"https://raw.githubusercontent.com/pystorage/pykeyboard/master/docs/source/images/row_reply_button.png\" alt=\"row_reply_button\"></p>\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Best Keyboard and Pagination for the Pyrogram Library.",
"version": "0.1.5",
"project_urls": {
"Homepage": "https://github.com/pystorage/pykeyboard"
},
"split_keywords": [
"telegram",
"pyrogram",
"keyboard",
"bot",
"userbot"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7d7ec49621c33ccbd5d04a6a12be2082b8f9941cf89b97f81e1aa42713a87829",
"md5": "878bf731895463dc8927484f4897b361",
"sha256": "b77be4341129ae73e363d46fe1f3243132fc04932f4ad2f7f8234d0971de4de4"
},
"downloads": -1,
"filename": "pykeyboard-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "878bf731895463dc8927484f4897b361",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7466,
"upload_time": "2022-02-01T12:20:20",
"upload_time_iso_8601": "2022-02-01T12:20:20.589852Z",
"url": "https://files.pythonhosted.org/packages/7d/7e/c49621c33ccbd5d04a6a12be2082b8f9941cf89b97f81e1aa42713a87829/pykeyboard-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-02-01 12:20:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pystorage",
"github_project": "pykeyboard",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "pykeyboard"
}