Skip to main content

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

Project description

OSRSBytes

Updates [20200925]

Currently implemented in v1.2.0:

  • Hiscores Shelve-caching (reduces the number of calls to the api).

Fixes currently implemented in v1.2.0:

  • Previously, ItemID and ItemName each had their own dictionary to allow users to search by either ItemID or ItemName. This was dumb of me, so I instead implemented one dictionary that was keyed by ItemName. You can still search by ItemID thanks to the self.__normalize_input() method which will ensure that anything you input is converted to item name. If you put in int(1213) or str(1213) the method will, ultimately, return "rune dagger"

Introduction

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

Installation:

pip install OSRSBytes

Upgrade

pip install OSRSBytes --upgrade

Example Invocation (Hiscores)

from OSRSBytes import Hiscores

user = Hiscores('Zezima', 'N')

# 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'))

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'))

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

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

OSRSBytes-1.2.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: OSRSBytes-1.2.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for OSRSBytes-1.2.1.tar.gz
Algorithm Hash digest
SHA256 4cc8e60f736d82ba24a84bddaf61a8a9ca5a61af99ecea414ab8be00684a3e53
MD5 7e908739978f9436b2fd4f6dd16f1e59
BLAKE2b-256 563b0888c25c6f3b1c40c583d5e1833cc87290a865db8350fe8977d8887c5879

See more details on using hashes here.

File details

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

File metadata

  • Download URL: OSRSBytes-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for OSRSBytes-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07845cca9fbe0610284b5bcaa4f1ebe506bb66f3d5cce066434b03d01dac2208
MD5 b6ba2f8f825e997d2e776be1f711fb5a
BLAKE2b-256 6e1c2576d0e6ea90776f07d68118fe5758d53cfc99b37fce239d83bfe98905a4

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