Skip to content

Installation

PyKeyboard is available on PyPI and can be installed using pip or poetry.

Requirements

  • Python 3.9 or higher
  • Kurigram (automatically installed)

Install with pip

pip install pykeyboard-kurigram

Install with poetry

poetry add pykeyboard-kurigram

Install from source

git clone https://github.com/johnnie-610/pykeyboard.git
cd pykeyboard
pip install -e .

Development Setup

For development and testing:

git clone https://github.com/johnnie-610/pykeyboard.git
cd pykeyboard
poetry install

Dependencies

PyKeyboard has minimal dependencies:

  • pydantic >= 2.11.7 - Type validation
  • kurigram >= 2.2.10 - Telegram bot framework

Optional dependencies:

  • pyyaml - YAML export/import support
  • TgCrypto - Faster Pyrogram performance (recommended)

Verification

After installation, verify PyKeyboard is working:

import pykeyboard

# Check version
print(pykeyboard.__version__)

# Quick test
from pykeyboard import InlineKeyboard, InlineButton

keyboard = InlineKeyboard()
keyboard.add(InlineButton("Test", "test"))
print("✅ PyKeyboard is working!")

Troubleshooting

Import Error

If you get import errors, make sure you're using Python 3.9+:

python --version

Kurigram Issues

PyKeyboard requires Kurigram. If you have import issues:

pip install kurigram

TgCrypto Warning

You might see a warning about TgCrypto missing. This is optional but recommended:

pip install TgCrypto

This will improve Pyrogram's performance but is not required for PyKeyboard to work.