Disclaimer: This project is not officially affiliated with Kahoot in any way. It is an open-source project created for educational purposes only. Use at your own risk. I bear no responsibility for any misuse of this tool.
kahoot-py
KahootPy is a Python client for interacting with the Kahoot API, allowing you to join games, send responses, and handle events in real-time.
Install the package via pip:
pip install kahoot
Import and use KahootPy in your Python script:
from kahoot import KahootClient
Here's a basic example of how to use the KahootClient: Info: Check client_example.py for an example that correctly utilizes the API
import asyncio
from kahoot import KahootClient
from kahoot.packets.server.question_start import QuestionStartPacket
async def question_start(packet: QuestionStartPacket):
print(f"Question started: {packet}")
async def main():
client = KahootClient()
client.on("question_start", question_start)
await client.join_game(game_pin=3850352, username='your_username')
# Run the main function
asyncio.run(main())
join_game
method to join a game with a specific PIN and username.on
method.kahoot/
āāā __init__.py # Package initialization
āāā packets/ # Packet definitions and implementations
āāā util/ # Utility functions (e.g., challenge solver, logger)
āāā exceptions.py # Custom exceptions
āāā constants.py # Constant values (e.g., USER_AGENT)
āāā README.md # Documentation
httpx
for HTTP requests and aiocometd
for WebSocket communication.asyncio
for efficient real-time interaction.This project is licensed under the GNU GPLv3 License - see the LICENSE file for details.
Contributions are welcome! Feel free to:
Vehbi
This tool is intended for educational and personal use only. Users must ensure compliance with Kahoot's terms of service and applicable laws.
Made with ā¤ļø by @vehbiu