Skip to main content

Python client for Old School RuneScape Hiscores API.

Project description

OSRS Hiscores

Simple OSRS Hiscores client for Python.


Installation

pip install osrs-hiscores-client

Usage

from osrs_hiscores.client import HiscoresClient

rsn = "Lynx Titan"

client = HiscoresClient()

stats = client.get_player_stats(rsn)

print(f"Player {stats.rsn} has agility level of {stats.skills.agility.level}, {stats.skills.agility.experience} experience and rank {stats.skills.agility.rank}.")
# Player Lynx Titan has agility level of 99, 200000000 experience and rank 24.

# You can also loop all skills if you want to!
for skill in stats.skills:
    print(f"Player {stats.rsn} has {skill.name} level of {skill.level}, {skill.experience} experience and rank {skill.rank}")

# Player Lynx Titan has Total level of 2278, 4600000000 experience and rank 83066
# Player Lynx Titan has Attack level of 99, 200000000 experience and rank 15
# Player Lynx Titan has Defence level of 99, 200000000 experience and rank 28
# Player Lynx Titan has Strength level of 99, 200000000 experience and rank 18
# Player Lynx Titan has Hitpoints level of 99, 200000000 experience and rank 7
# ...

# Each object can be turn into dictionary if need.
print(stats.skills.cooking.to_dict())
# {'name': 'Cooking', 'rank': 150, 'level': 99, 'experience': 200000000}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osrs_hiscores_client-0.1.1.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file osrs_hiscores_client-0.1.1.tar.gz.

File metadata

  • Download URL: osrs_hiscores_client-0.1.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for osrs_hiscores_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 95c8295db0416acf88dfc1f795264db7185fb404e24a6e318a0f44d8f1075a60
MD5 3c14886678397d244bbd959c6c2294ff
BLAKE2b-256 8224ee660d201a4b06c59ea4b4acfee456f715d570e279497380ec80d9e5317b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page