Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 3.1 KB

README.md

File metadata and controls

51 lines (38 loc) · 3.1 KB

hypickle

A script that outputs realtime hypixel stats for custom lists of friends you create.

Installation:

To install, run the following command:

pip install hypickle

Besides installing the script, this will also automatically install its dependencies (the libraries requests, rich, mplcursors, deepdiff, pyttsx3, and any of their own dependencies).

Then, create a new folder that will be used to store persistent information (such as friends lists you create). In this folder, make a textfile called 'api-key.txt', and paste your hypixel api key as the first line.

After setting this up, you will be able to open a terminal window in this directory and run various commands with the hypickle script (explained below).

Main features:

  • Basic usage is to run with hypickle *username/uuid*
    • This will output stats for the specified player, and then output any friends for them.
    • Since the friends endpoint of hypixel's API was deprecated, you must manually add any friends for them you want. To do this, run hypickle addfriends *username/uuid*
  • If there's a player you run the program on often, consider making an alias for their uuid:
    • Run hypickle updateuuidaliases *username*
    • Then when running hypickle *username*, the program will automatically substitute the username for the uuid. This is useful when running the program in quick succession for the same player, since the hypixel api forces a cooldown when sending in a username instead of a uuid.
  • You can also add an optional argument called 'all', if you'd like to output all friends (not just those currently online).
    • E.g., hypickle *username/uuid* all

Developer commands:

Open the root directory of the project in the terminal, and then:

  • python main.py *args* allows you to test any local changes you've made to the project.
  • vulture . will find unused code.
  • mypy . will typecheck.
  • vermin . deduces the oldest version of python that works to run the project. The expected output is 3.8, corresponding with requires-python = ">= 3.8" in pyproject.toml.
  • pylint *.py will review the code for style.
  • pydeps hypickle will output a dependency graph of the project's modules.
  • lintception is a script I wrote that calls mypy, vulture, and vermin, and also does some other linting checks (e.g., functions which are never/rarely used). Requires installing with pip install lintception.
  • pytest tests.py runs a few basic automated tests. Note that this requires installing the lintception library. To run manual tests (i.e., the output to the screen needs to be judged by the tester), run python tests.py.

Acknowledgements:

The hypixel.py and leveling.py files were originally from Snuggle's repo. Since then I have made a number of modifications to them.