Loading repository data…
Loading repository data…
duhby / repository
An asynchronous, feature-rich, Hypixel API wrapper for Python
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
.. .. image:: https://img.shields.io/discord/719949131497603123.svg?color=%237289da&label=discord&logo=discord&style=for-the-badge .. :target: https://discord.gg/PtsBc4b/ .. :alt: Discord .. image:: https://img.shields.io/pypi/dm/hypixel.py?color=blueviolet&style=for-the-badge :target: https://pypi.python.org/pypi/hypixel.py/ :alt: PyPI downloads .. image:: https://img.shields.io/pypi/v/hypixel.py.svg?style=for-the-badge&logo=semantic-release&color=blue :target: https://pypi.python.org/pypi/hypixel.py/ :alt: PyPI version info .. image:: https://img.shields.io/github/license/duhby/hypixel.py?style=for-the-badge&color=bright-green :target: https://github.com/duhby/hypixel.py/blob/master/LICENSE/ :alt: License .. image:: https://img.shields.io/readthedocs/hypixelpy/latest?style=for-the-badge :target: https://hypixelpy.readthedocs.io/en/stable/ :alt: Documentation Status
.. start_doc
Hypixel.py is a modern, asynchronous, feature-rich, Hypixel API wrapper for Python.
The purpose of this project is to simplify the task of writing scripts that interact with the Hypixel API by converting responses into organized python models and abstracting requests into asynchronous functions, while also offering customization options and useful features.
async and await syntax... end_doc
Check out the examples <https://hypixelpy.readthedocs.io/en/stable/examples.html>_ and documentation <https://hypixelpy.readthedocs.io/en/stable/>_!
Python 3.8+ is required (3.10.8+ recommended)
Installation ^^^^^^^^^^^^
To install hypixel.py, install it from pypi under the name
hypixel.py with pip or your favorite package manager.
.. code:: sh
pip install hypixel.py --upgrade
You can append [speed] to install optional packages (see below) to
improve the performance of aiohttp and json.
Warning: cchardet does not support python 3.10+ and subsequently
will not be installed using [speed] if you're on 3.10 or higher.
.. code:: sh
pip install hypixel.py[speed] --upgrade
Optional Packages ^^^^^^^^^^^^^^^^^
To ehnahce aiohttp performance:
aiodns <https://pypi.org/project/aiodns/>_brotlipy <https://pypi.org/project/brotlipy/>_cchardet <https://pypi.org/project/cchardet/>_To enhance json decoding (up to 4x faster):
ujson <https://pypi.org/project/ujson/>_Warning ^^^^^^^
If you are running a Python version older than 3.10.8 on Windows, you must run the following code before calling asyncio.run:
.. code:: python
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
Quick Example ^^^^^^^^^^^^^
.. code:: python
import hypixel from hypixel import HypixelException import asyncio
async def main(): client = hypixel.Client('api-key') async with client: try: player = await client.player('gamerboy80') print(f'[{player.bedwars.level}✫] [{player.rank}] {player.name}') except HypixelException as error: print(error)
if name == 'main': asyncio.run(main())
You can find more examples in the documentation <https://hypixelpy.readthedocs.io/en/stable/examples.html>_