Skip to main content

A complete and up-to-date database of Old School RuneScape (OSRS) items.

Project description

osrsbox-db

Build Status PyPI - Python Version

PyPI version PyPI - Downloads

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 as name, name, examine text, store cost, high_alch and low_alch values and quest association.
  • ItemEquipment: All equipable items (armour and weapons) have stats including attack_slash, defence_crush and melee_strength values. Additional information about equipable items include skill_reqs to wear armour or wield weapons, and attack_speed and item slot properties.

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

osrsbox-1.0.6.tar.gz (692.1 kB view details)

Uploaded Source

File details

Details for the file osrsbox-1.0.6.tar.gz.

File metadata

  • Download URL: osrsbox-1.0.6.tar.gz
  • Upload date:
  • Size: 692.1 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

Hashes for osrsbox-1.0.6.tar.gz
Algorithm Hash digest
SHA256 8b97774e5913953777cf9258318bf21c3c91b3a140b33873ab7e30e4d733f309
MD5 173f316c4e385905ee76d02e78e99859
BLAKE2b-256 a79ef0c3bd870cd7ce55753113051c727ca2cd270b6b16ac6bb8cae4586861ac

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