A complete and up-to-date database of Old School RuneScape (OSRS) items.
Project description
osrsbox-db
A complete and up-to-date database of Old School Runescape (OSRS) items
The osrsbox package is a complete and up-to-date database of OSRS items that is accessible via a Python API. Complete means it holds every single items in OSRS. Up-to-date means this database is updated after every weekly game update to ensure accurate information. This package contains just the Python API and the actual item database - the tools and data used to build the item database are available from the osrsbox-db GitHub repository.
Quick Start
- Make sure you have >= Python 3.6
- Install package using:
pip install osrsbox - Import items API using:
from osrsbox import items_api - Load all items using:
all_db_items = items_api.load() - Loop items using:
for item in all_db_items: print(item.name)
Package Requirements
- Python 3.6 or above
Installation
The easiest way to install the osrsbox package is through the Python Package Index using the pip command. You need to have pip installed - and make sure it is updated (especially on Windows). Then you can install the osrsbox package using pip:
pip install osrsbox
Alternatively, you can clone the latest development release using git and install the package using the following commands:
git clone https://github.com/osrsbox/osrsbox-db.git
cd osrsbox-db
python setup.py install
Usage
The key use of the osrsbox package is to load and automate processing of OSRS items and their associated metadata. Each item is represented by the following objects:
ItemDefinition: Contains basic item metadata such asname,name,examinetext, storecost,high_alchandlow_alchvalues andquestassociation.ItemEquipment: All equipable items (armour and weapons) have stats includingattack_slash,defence_crushandmelee_strengthvalues. Additional information about equipable items includeskill_reqsto wear armour or wield weapons, andattack_speedand itemslotproperties.
You can load the package using import osrsbox, however, you probably want to load the items_api module. A simple example of using the package to load all the items, then print out the item ID and name of every item in OSRS is provided below:
>>> from osrsbox import items_api
>>> all_db_items = items_api.load()
>>> for item in all_db_items:
... print(item.id, item.name)
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
File details
Details for the file osrsbox-1.0.4.tar.gz.
File metadata
- Download URL: osrsbox-1.0.4.tar.gz
- Upload date:
- Size: 691.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1df9e69033ac4a4e0920d66be4ee36dea91780cf4552e98cd465634787010ac2
|
|
| MD5 |
f70a297e50c8046aa64e2a5aced8b8f7
|
|
| BLAKE2b-256 |
47605ca77289b159f7eef12d0f76e492e729fc3f030499d584aa8ddcd30940ae
|