vehbiu / kahoot-py

šŸŒ - A python library for interacting with *Kahoot* live quizzes!
https://pypi.org/project/kahoot
GNU General Public License v3.0
1 stars 0 forks source link
kahoot kahoot-answers kahoot-bot kahootit pypi python

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

Python Open Source MIT License

KahootPy is a Python client for interacting with the Kahoot API, allowing you to join games, send responses, and handle events in real-time.

šŸŒŸ Features

šŸš€ Quick Start

  1. Install the package via pip:

    pip install kahoot
  2. Import and use KahootPy in your Python script:

    from kahoot import KahootClient

šŸ› ļø Example Usage

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

šŸŽ‰ Event Handlers

šŸ“ Project Structure

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

āš™ļø Technical Details

šŸ“ License

This project is licensed under the GNU GPLv3 License - see the LICENSE file for details.

šŸ¤ Contributing

Contributions are welcome! Feel free to:

šŸ‘¤ Author

Vehbi

šŸ”’ Responsible Use

This tool is intended for educational and personal use only. Users must ensure compliance with Kahoot's terms of service and applicable laws.

šŸ™ Acknowledgments

šŸ“Š Stats

GitHub stars GitHub forks


Made with ā¤ļø by @vehbiu