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¶
Install with poetry¶
Install from source¶
Development Setup¶
For development and testing:
Dependencies¶
PyKeyboard has minimal dependencies:
pydantic >= 2.11.7- Type validationkurigram >= 2.2.10- Telegram bot framework
Optional dependencies:
pyyaml- YAML export/import supportTgCrypto- 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+:
Kurigram Issues¶
PyKeyboard requires Kurigram. If you have import issues:
TgCrypto Warning¶
You might see a warning about TgCrypto missing. This is optional but recommended:
This will improve Pyrogram's performance but is not required for PyKeyboard to work.