Skip to main content

An all-in-one OSRS Library with Hiscores and Grand Exchange Market Information

Project description

OSRSBytes (v1.3.1)

version downloads
size platform & version support

Introduction

OSRSBytes is an all-in-one Python library for Old School Runescape (OSRS) that features Item Information Lookup, Hiscores, and Market information from RuneLite/Wiki.

Installation:

pip install OSRSBytes

Upgrade

pip install OSRSBytes --upgrade

Example Invocation (Hiscores)

The OSRSBytes library contains caching on Hiscores to improve performance. Caching is disabled by default and must be enabled when initializing the hiscores object. Note that default TTL of cache is 3600 seconds or 1 hour. Example without Caching

from OSRSBytes import Hiscores

user = Hiscores('Zezima')

# Lets display some information
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'))

# Lets display some Boss information
print("Wintertodt Kills:", user.boss("wintertodt", "score"))

# Lets display some Clue Hiscores
print("Medium clues done:", user.clue("medium", "score"))

Example Invocation (Items)

from OSRSBytes import Items

items = Items()

# Lets get information on this item
print('Is Members:',    items.isMembers('rune dagger'))
print("Item ID:",         items.getItemID('rune dagger'))
    
print('Sell Average:',  items.getSellAverage('rune dagger'))
print('Sell Quantity:', items.getSellQuantity('rune dagger'))

print('Buy Average:',  items.getBuyAverage('rune dagger'))
print('Buy Quantity:', items.getBuyQuantity('rune dagger'))
print('Buy Limit:',    items.getBuyLimit('fire rune'))

print('Shop Price:',      items.getShopPrice('rune dagger'))
print('High Alch Value:', items.getHighAlchValue('rune dagger'))
print('Low Alch Value:',  items.getLowAlchValue('rune dagger'))

# In addition, all items can be called by Item ID as well
print('Item Name:',       items.getName('1213'))
print('Sell Average:',    items.getSellAverage('1213'))

# Lets update all of the item information after some time has passed
items.update()

# Lets get some new, up-to-date information
print('Sell Average:', items.getSellAverage('rune dagger')

Contributing

Prior to contributing, please consider the following before committing code:

  1. Do not leave commented lines in code (i.e. #print('test')
  2. Try to write your code as cleanly and readable as possible
  3. Whenever possible, do not use third party packages, try your hardest to utilize built-in python packages
  4. No commits should break previous code functionality. This means that method names should remain the same and return the same, expected values in the same format.
  5. NEW: All code should be indented with spaces rather than tabs.
  6. NEW: All code should be pushed to dev branch instead of master branch. All pull requests sent to master will be rejected.

Thank you for your considerations

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

OSRSBytes-1.3.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

OSRSBytes-1.3.1-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file OSRSBytes-1.3.1.tar.gz.

File metadata

  • Download URL: OSRSBytes-1.3.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.9 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.7

File hashes

Hashes for OSRSBytes-1.3.1.tar.gz
Algorithm Hash digest
SHA256 b60af4b997fe9f7e3846b2bd5b0de21cf153acbec741c575ebbcc10f2458fa1d
MD5 2cb2d75be2a918c071be4c431f9cedaf
BLAKE2b-256 250a6ab658a978b3cdcf700046fb638934a4a07dde6dfb516954c9c2051805ae

See more details on using hashes here.

File details

Details for the file OSRSBytes-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: OSRSBytes-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.9 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.7

File hashes

Hashes for OSRSBytes-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3f06d216ecdd8f2426e5886873d7b025be50fb71e05622ff386bfb8e948476c7
MD5 ab7d0c18f5e5f5918964a72788024709
BLAKE2b-256 94f34371de13b2a6c8c092a223a8c6b5f28c78b6a759766b2ef8f2cc24f7e96c

See more details on using hashes here.

Supported by

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