OSRS Hiscores API Library
Purpose
The purpose of this library is to interface with Old School Runescape (OSRS)'s Hiscores page and allow developers to access stat levels, ranks, and experience levels in a more intuitive way (via dictionary). This library accesses this information via a http.client request and parses the information accordingly.
Installation
python -m pip install OSRS-Hiscores
Example Usage
from OSRS_Hiscores import Hiscores
# User to lookup
username = 'Zezima'
# Initialize user object, if no account type is specified, we assume 'N'
user = Hiscores(username, 'N')
# Get the entire stat dictionary
user.stats
# Get total Levels
user.skill('total')
# Get a specific skill's ranking, level, and experience
user.stats['runecrafting']
# Get skill's level, ranking, and experience separately
user.stats['runecrafting']['level']
user.stats['runecrafting']['rank']
user.stats['runecrafting']['experience']
# NEW
user.stats['runecrafting']['next_level_experience'] # Total Exp needed for next level
user.stats['runecrafting']['exp_to_next_level'] # Exp remaining til next level
# A simpler way to just get a skill's attributes
print("Current level:", user.skill('attack', 'level'))
print("Current rank:", user.skill('attack', 'rank'))
print("Current exp:", user.skill('attack', 'experience'))
print("Exp remaining:", user.skill('attack','exp_to_next_level'))
Metadata
Release files for OSRS-Hiscores 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| OSRS-Hiscores-0.5.tar.gz | 3.7 kB | Details |
Release files / OSRS-Hiscores-0.5.tar.gz
| Download URL | OSRS-Hiscores-0.5.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62dc72f27313f199189868d382696d35db41d97fc95c810404cb5e9ec36faa85
|
|
BLAKE2b-256 checksum How to use checksums |
90c6f4860b580089f36285e9e86e96fb05191988254c79d46072644172637045
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7
|