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.
🌟 Features
- Join Games: Quickly join Kahoot games using game PINs.
- Event Handling: Register handlers for various game events such as questions and game status updates.
- Real-Time Communication: Utilize WebSocket connections for real-time interaction with the Kahoot server.
- User-Friendly: Simple interface for sending packets and handling game events.
🚀 Quick Start
-
Install the package via pip:
pip install kahoot
-
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
- Joining a Game: Use the
join_gamemethod to join a game with a specific PIN and username. - Listening for Events: Register handlers for various events (e.g., questions, game status) using the
onmethod.
📁 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
- Built using
httpxfor HTTP requests andaiocometdfor WebSocket communication. - Utilizes asynchronous programming with Python's
asynciofor efficient real-time interaction. - Modular design with separate packet handling and utility functions for easy maintenance.
📝 License
This project is licensed under the GNU GPLv3 License - see the LICENSE file for details.
🤝 Contributing
Contributions are welcome! Feel free to:
- Open issues
- Submit pull requests
- Suggest new features or improvements
👤 Author
Vehbi
- GitHub: @vehbiu
🔒 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
- Inspired by the need for real-time interaction with Kahoot's educational games.
📊 Stats
Made with ❤️ by @vehbiu
Metadata
Release files for kahoot 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kahoot-1.1.0.tar.gz | 22.4 kB | Without provenance | Details for kahoot-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kahoot-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for kahoot-1.1.0-py3-none-any.whl |
Total release size: 45.8 kB
Release files / kahoot-1.1.0.tar.gz
| Download URL | kahoot-1.1.0.tar.gz |
|---|---|
| Size | 22.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2462dbb87770127535414036528edb716319ba54f58448fd42e1d29c2c3ba703
|
|
BLAKE2b-256 checksum How to use checksums |
2d62bc738cee82c2f7c9a8fbc167215da1deb2c31f0f5fc9e84f41acfe172a5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / kahoot-1.1.0-py3-none-any.whl
| Download URL | kahoot-1.1.0-py3-none-any.whl |
|---|---|
| Size | 23.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b8725892a5b88334477e7132b19c5be78861d29d19905dd233f37342ae39f60
|
|
BLAKE2b-256 checksum How to use checksums |
81094072adeb412ea9419e36677064d12f392e5bf66789f258c11ff861ae0c81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Security for kahoot 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.