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

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} and rank {skill.rank}")

    # Player Lynx Titan has Total level of 2278, 4600000000 and rank 83066
    # Player Lynx Titan has Attack level of 99, 200000000 and rank 15
    # Player Lynx Titan has Defence level of 99, 200000000 and rank 28
    # Player Lynx Titan has Strength level of 99, 200000000 and rank 18
    # Player Lynx Titan has Hitpoints level of 99, 200000000 and rank 7
    # Player Lynx Titan has Ranged level of 99, 200000000 and rank 8
    # Player Lynx Titan has Prayer level of 99, 200000000 and rank 11
    # Player Lynx Titan has Magic level of 99, 200000000 and rank 29
    # Player Lynx Titan has Cooking level of 99, 200000000 and rank 150
    # Player Lynx Titan has Woodcutting level of 99, 200000000 and rank 15
    # Player Lynx Titan has Fletching level of 99, 200000000 and rank 12
    # Player Lynx Titan has Fishing level of 99, 200000000 and rank 9
    # Player Lynx Titan has Firemaking level of 99, 200000000 and rank 48
    # Player Lynx Titan has Crafting level of 99, 200000000 and rank 4
    # Player Lynx Titan has Smithing level of 99, 200000000 and rank 3
    # Player Lynx Titan has Mining level of 99, 200000000 and rank 23
    # Player Lynx Titan has Herblore level of 99, 200000000 and rank 5
    # Player Lynx Titan has Agility level of 99, 200000000 and rank 24
    # Player Lynx Titan has Thieving level of 99, 200000000 and rank 12
    # Player Lynx Titan has Slayer level of 99, 200000000 and rank 2
    # Player Lynx Titan has Farming level of 99, 200000000 and rank 19
    # Player Lynx Titan has Runecrafting level of 99, 200000000 and rank 6
    # Player Lynx Titan has Hunter level of 99, 200000000 and rank 4
    # Player Lynx Titan has Construction level of 99, 200000000 and rank 4
    # Player Lynx Titan has Sailing level of 1, 0 and rank -1

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.0.tar.gz (2.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: osrs_hiscores_client-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 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.0.tar.gz
Algorithm Hash digest
SHA256 5a8e2e5aa67442d2f93a209ff71ba115b2bcb47a7f0f1540e70626d8bb66f944
MD5 07f00ac42ac8dc0abf54d36c01cb5db0
BLAKE2b-256 c031a1e7e54781e52353c452aa7157d23128766622a0395255ac9b047c4afbf4

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