An all-in-one OSRS Library with Hiscores and Grand Exchange Market Information
Project description
OSRSBytes
Updates [20201004]
Bug Fix:
- Fixed a bug with buylimits that caused entire package to crash if anything failed to parse.
Currently implemented in v1.2.2:
- Hiscores Shelve-caching (reduces the number of calls to the api).
Fixes currently implemented in v1.2.2:
- 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 inint(1213)
orstr(1213)
the method will, ultimately, return"rune dagger"
hotfix:
- Fixed an issue with package not installing from pip
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:
- Do not leave commented lines in code (i.e.
#print('test')
- Try to write your code as cleanly and readable as possible
- Whenever possible, do not use third party packages, try your hardest to utilize built-in python packages
Thank you for your considerations
Project details
Release history Release notifications | RSS feed
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.3.tar.gz
(9.6 kB
view hashes)
Built Distribution
OSRSBytes-1.2.3-py3-none-any.whl
(18.2 kB
view hashes)
Close
Hashes for OSRSBytes-1.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9085786c8e65e48e8c125e6d164f2b449a3209f476ff47c428fe370308743cb4 |
|
MD5 | 81acc8f54a1770632eefedc793ad443b |
|
BLAKE2b-256 | ca04b78fdb8501f0345546b03ef80c66f8856a75c5415dd514e608d6563b702f |