Name | kahoot JSON |
Version |
1.1.0
JSON |
| download |
home_page | None |
Summary | A Python package for interacting with the (private) Kahoot! Player API |
upload_time | 2024-10-19 16:06:57 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | None |
keywords |
kahoot
api
player
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
> **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](https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white)
![Open Source](https://img.shields.io/badge/Open_Source-green?style=for-the-badge&logo=opensource&logoColor=white)
![MIT License](https://img.shields.io/badge/License-GNU-yellow.svg?style=for-the-badge)
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
1. Install the package via pip:
```bash
pip install kahoot
```
2. Import and use KahootPy in your Python script:
```python
from kahoot import KahootClient
```
## 🛠️ Example Usage
Here's a basic example of how to use the KahootClient:
**Info**: Check [client_example.py](https://github.com/vehbiu/kahoot-py/blob/main/client_example.py) for an example that correctly utilizes the API
```python
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_game` method 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 `on` method.
## 📁 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 `httpx` for HTTP requests and `aiocometd` for WebSocket communication.
- Utilizes asynchronous programming with Python's `asyncio` for 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](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](https://github.com/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
![GitHub stars](https://img.shields.io/github/stars/vehbiu/kahoot-py?style=social)
![GitHub forks](https://img.shields.io/github/forks/vehbiu/kahoot-py?style=social)
---
Made with ❤️ by [@vehbiu](https://github.com/vehbiu)
Raw data
{
"_id": null,
"home_page": null,
"name": "kahoot",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "kahoot, api, player",
"author": null,
"author_email": "Vehbi <me@vehbi.me>",
"download_url": "https://files.pythonhosted.org/packages/2d/62/bc738cee82c2f7c9a8fbc167215da1deb2c31f0f5fc9e84f41acfe172a5d/kahoot-1.1.0.tar.gz",
"platform": null,
"description": "> **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.\r\n# kahoot-py\r\n![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white)\r\n![Open Source](https://img.shields.io/badge/Open_Source-green?style=for-the-badge&logo=opensource&logoColor=white)\r\n![MIT License](https://img.shields.io/badge/License-GNU-yellow.svg?style=for-the-badge)\r\n\r\nKahootPy is a Python client for interacting with the Kahoot API, allowing you to join games, send responses, and handle events in real-time.\r\n\r\n## \ud83c\udf1f Features\r\n- **Join Games**: Quickly join Kahoot games using game PINs.\r\n- **Event Handling**: Register handlers for various game events such as questions and game status updates.\r\n- **Real-Time Communication**: Utilize WebSocket connections for real-time interaction with the Kahoot server.\r\n- **User-Friendly**: Simple interface for sending packets and handling game events.\r\n\r\n## \ud83d\ude80 Quick Start\r\n1. Install the package via pip:\r\n ```bash\r\n pip install kahoot\r\n ```\r\n\r\n2. Import and use KahootPy in your Python script:\r\n ```python\r\n from kahoot import KahootClient\r\n ```\r\n\r\n## \ud83d\udee0\ufe0f Example Usage\r\nHere's a basic example of how to use the KahootClient:\r\n**Info**: Check [client_example.py](https://github.com/vehbiu/kahoot-py/blob/main/client_example.py) for an example that correctly utilizes the API\r\n\r\n```python\r\nimport asyncio\r\nfrom kahoot import KahootClient\r\nfrom kahoot.packets.server.question_start import QuestionStartPacket\r\n\r\nasync def question_start(packet: QuestionStartPacket):\r\n print(f\"Question started: {packet}\")\r\n\r\nasync def main():\r\n client = KahootClient()\r\n client.on(\"question_start\", question_start)\r\n await client.join_game(game_pin=3850352, username='your_username')\r\n\r\n# Run the main function\r\nasyncio.run(main())\r\n```\r\n\r\n### \ud83c\udf89 Event Handlers\r\n- **Joining a Game**: Use the `join_game` method to join a game with a specific PIN and username.\r\n- **Listening for Events**: Register handlers for various events (e.g., questions, game status) using the `on` method.\r\n\r\n## \ud83d\udcc1 Project Structure\r\n```\r\nkahoot/\r\n\u251c\u2500\u2500 __init__.py # Package initialization\r\n\u251c\u2500\u2500 packets/ # Packet definitions and implementations\r\n\u251c\u2500\u2500 util/ # Utility functions (e.g., challenge solver, logger)\r\n\u251c\u2500\u2500 exceptions.py # Custom exceptions\r\n\u251c\u2500\u2500 constants.py # Constant values (e.g., USER_AGENT)\r\n\u2514\u2500\u2500 README.md # Documentation\r\n```\r\n\r\n## \u2699\ufe0f Technical Details\r\n- Built using `httpx` for HTTP requests and `aiocometd` for WebSocket communication.\r\n- Utilizes asynchronous programming with Python's `asyncio` for efficient real-time interaction.\r\n- Modular design with separate packet handling and utility functions for easy maintenance.\r\n\r\n## \ud83d\udcdd License\r\nThis project is licensed under the GNU GPLv3 License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## \ud83e\udd1d Contributing\r\nContributions are welcome! Feel free to:\r\n- Open issues\r\n- Submit pull requests\r\n- Suggest new features or improvements\r\n\r\n## \ud83d\udc64 Author\r\n**Vehbi**\r\n- GitHub: [@vehbiu](https://github.com/vehbiu)\r\n\r\n## \ud83d\udd12 Responsible Use\r\nThis tool is intended for educational and personal use only. Users must ensure compliance with Kahoot's terms of service and applicable laws.\r\n\r\n## \ud83d\ude4f Acknowledgments\r\n- Inspired by the need for real-time interaction with Kahoot's educational games.\r\n\r\n## \ud83d\udcca Stats\r\n![GitHub stars](https://img.shields.io/github/stars/vehbiu/kahoot-py?style=social)\r\n![GitHub forks](https://img.shields.io/github/forks/vehbiu/kahoot-py?style=social)\r\n\r\n---\r\nMade with \u2764\ufe0f by [@vehbiu](https://github.com/vehbiu)\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python package for interacting with the (private) Kahoot! Player API",
"version": "1.1.0",
"project_urls": {
"Homepage": "https://github.com/vehbiu/kahoot-py"
},
"split_keywords": [
"kahoot",
" api",
" player"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "81094072adeb412ea9419e36677064d12f392e5bf66789f258c11ff861ae0c81",
"md5": "98004fa81b1a5bef226afd0fdb5904d9",
"sha256": "5b8725892a5b88334477e7132b19c5be78861d29d19905dd233f37342ae39f60"
},
"downloads": -1,
"filename": "kahoot-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "98004fa81b1a5bef226afd0fdb5904d9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 23380,
"upload_time": "2024-10-19T16:06:55",
"upload_time_iso_8601": "2024-10-19T16:06:55.395334Z",
"url": "https://files.pythonhosted.org/packages/81/09/4072adeb412ea9419e36677064d12f392e5bf66789f258c11ff861ae0c81/kahoot-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2d62bc738cee82c2f7c9a8fbc167215da1deb2c31f0f5fc9e84f41acfe172a5d",
"md5": "aff6b911377dc0f324f4321267e72921",
"sha256": "2462dbb87770127535414036528edb716319ba54f58448fd42e1d29c2c3ba703"
},
"downloads": -1,
"filename": "kahoot-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "aff6b911377dc0f324f4321267e72921",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 22375,
"upload_time": "2024-10-19T16:06:57",
"upload_time_iso_8601": "2024-10-19T16:06:57.388910Z",
"url": "https://files.pythonhosted.org/packages/2d/62/bc738cee82c2f7c9a8fbc167215da1deb2c31f0f5fc9e84f41acfe172a5d/kahoot-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-19 16:06:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "vehbiu",
"github_project": "kahoot-py",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "kahoot"
}