# osrsbox-db
[![Build Status](https://travis-ci.org/osrsbox/osrsbox-db.svg?branch=master)](https://travis-ci.org/osrsbox/osrsbox-db) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/osrsbox.svg)
[![PyPI version](https://badge.fury.io/py/osrsbox.svg)](https://badge.fury.io/py/osrsbox) ![PyPI - Downloads](https://img.shields.io/pypi/dm/osrsbox.svg)
[![Discord Chat](https://img.shields.io/discord/598412106118987787.svg)](https://discord.gg/HFynKyr)
## A complete and up-to-date database of Old School Runescape (OSRS) items, monsters and prayers
This project hosts a complete and up-to-date database of every item, every monster and every prayer in OSRS. **Complete** means it holds every single item, monster and prayer in OSRS. **Up-to-date** means this database is updated after every weekly game update to ensure accurate information.
The item database has extensive properties for each item: a total of 27 properties for every item, an additional 16 properties for equipable items, and an additional 3 properties for equipable weapons. These properties include the item ID and name, whether an item is tradeable, stackable, or equipable or if the item is members only or associated with a quest. For any equipable item, there are additional properties about combat stats the item has; for example, what slash attack bonus, magic defence bonus or prayer bonus that an item provides. For weapons, additional properties are added which include attack speed and combat stance/weapon type information.
The monster database also has extensive properties: a total of 44 unique properties for each monster, as well as an array of item drops for each monster that has 6 additional properties per item drop. The base properties include the monster ID, name, member status, and all monster combat stats. Additional properties include slayer-related properties, attack type, hit points and max hit. Each monster also has an associated array of drops which document the item ID, name, rarity, quantity, and any requirements to get the drop.
The prayer database documentes each prayer that available in-game and has detailed properties: a total of 8 properties for every prayer. The base properties include the prayer name, members status, description, requirements, and bonuses that it provides.
## Table of Contents
- [Project Summary](#project-summary)
- [The `osrsbox` Python PyPi Package](#the-osrsbox-python-pypi-package)
- [The osrsbox RESTful API](#the-osrsbox-restful-api)
- [The `osrsbox-db` GitHub Repository](#the-osrsbox-db-github-repository)
- [The Item Database](#the-item-database)
- [The Monster Database](#the-monster-database)
- [The Prayer Database](#the-prayer-database)
- [Additional Project Information](#additional-project-information)
- [Project Feedback](#project-feedback)
- [Project Contribution](#project-contribution)
- [Project License](#project-license)
- [Project Attribution](#project-attribution)
## Project Summary
The osrsbox-db project provides three primary data sources for:
1. **Items**
1. **Monsters**
1. **Prayers**
The osrsbox-db project and data is accessible using three primary methods:
1. [**The Python PyPi package**](https://pypi.org/project/osrsbox/)
1. [**The RESTful API**](https://github.com/osrsbox/osrsbox-api/)
1. [**The GitHub development repository**](https://github.com/osrsbox/osrsbox-db/)
## The `osrsbox` Python PyPi Package
If you want to access the item and monster database programmatically using Python, the simplest option is to use the [`osrsbox` package available from PyPi](https://pypi.org/project/osrsbox/). You can load the item and/or monster database and process item objects, monster objects, and their properties.
### Package Quick Start
- Make sure you have >= Python 3.6
- Install package using: `pip install osrsbox`
- Item database quick start:
- 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)`
- Monster database quick start:
- Import monsters API using: `from osrsbox import monsters_api`
- Load all monsters using: `all_db_monsters = monsters_api.load()`
- Loop monsters using: `for monster in all_db_monsters: print(monster.name)`
- Prayer database quick start:
- Import prayers API using: `from osrsbox import prayers_api`
- Load all prayers using: `all_db_prayers = prayers_api.load()`
- Loop prayers using: `for prayer in all_db_prayers: print(prayer.name)`
### Package Requirements
For the `osrsbox` PyPi package you must meet the following requirements:
- Python 3.6 or above
- Pip package manager
- Dataclasses package (if Python is below 3.7)
If you are using Python 3.6, the `dataclasses` package will automatically be installed. If you are using Python 3.7 or above, the `dataclasses` package is part of the standard library and will not be installed automatically.
### Package Installation
The easiest way to install the osrsbox package is through the [Python Package Index](http://pypi.python.org/) 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 the following `pip` command:
```
pip install osrsbox
```
### Package Upgrading
The package is consistently updated - usually after each weekly in-game update. This is because the in-game update usually introduces additional items into the game or changes existing items. Therefore, you should regularly check and update the `osrsbox` package. To achieve this, run `pip` with the `upgrade` flag, as demonstrated in the following command:
```
pip install --upgrade osrsbox
```
### Package Usage
The key use of the `osrsbox` package is to load and automate the processing of OSRS items and their associated metadata. You can load the package using `import osrsbox`, however, you probably want to load the `items_api` module or `monsters_api` module. A simple example of using the package to `load` all the items, then loop and print out the item ID and name of every item in OSRS is provided below:
```
phoil@gilenor ~ $ python3.6
Python 3.6.8 (default, Jan 14 2019, 11:02:34)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from osrsbox import items_api
>>> all_db_items = items_api.load()
>>> for item in all_db_items:
... print(item.id, item.name)
```
Instead of using the Python interpreter, you can also write a simple script and import the `osrsbox` Python package. An example script is provided below, this time for the `monsters_api`:
```
#!/usr/bin/python3
from osrsbox import monsters_api
all_db_monsters = monsters_api.load()
for monster in all_db_monsters:
print(monster.id, monster.name)
```
If you would like to review additional examples of using the `osrsbox` Python API, have a look at the [`items_api_examples` folder](https://github.com/osrsbox/osrsbox-db/tree/master/osrsbox/items_api_examples) and [`monsters_api_examples` folder](https://github.com/osrsbox/osrsbox-db/tree/master/osrsbox/monsters_api_examples). There are a number of scripts available that provide examples of loading and processing data using the Python API.
## The osrsbox RESTful API
The [official osrsbox-api GitHub repository](https://github.com/osrsbox/osrsbox-api) hosts the source code used for the RESTful API. The official `osrsbox-api` project is available from:
- [https://api.osrsbox.com](https://api.osrsbox.com)
Have a look at the [official `osrsbox-api` project README](https://github.com/osrsbox/osrsbox-api/blob/master/README.md) for more information on API endpoints, documentation, Swagger UI availability and examples of API queries.
## The `osrsbox-db` GitHub Repository
The [official osrsbox-db GitHub repository](https://github.com/osrsbox/osrsbox-db) hosts the source code for the entire
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共33个文件
py:20个
txt:4个
json:3个
资源分类:Python库 所属语言:Python 资源全名:osrsbox-1.3.15.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
osrsbox-1.3.15.tar.gz (33个子文件)
osrsbox-1.3.15
MANIFEST.in 129B
PKG-INFO 52KB
osrsbox.egg-info
PKG-INFO 52KB
requires.txt 39B
SOURCES.txt 914B
top_level.txt 8B
dependency_links.txt 1B
osrsbox
docs
monsters-complete.json 11.33MB
items-complete.json 37.97MB
prayers-complete.json 19KB
monsters_api
all_monsters.py 6KB
monster_properties.py 4KB
__init__.py 1KB
monster_drop.py 2KB
prayers_api
all_prayers.py 6KB
prayer_properties.py 2KB
__init__.py 1KB
__init__.py 0B
items_api
item_equipment.py 2KB
all_items.py 8KB
item_weapon.py 2KB
__init__.py 1KB
item_properties.py 4KB
test
test_monsters_database.py 2KB
test_monsters_api.py 2KB
test_prayers_api.py 2KB
test_prayers_database.py 2KB
test_items_database.py 2KB
test_items_api.py 2KB
LICENSE 34KB
setup.cfg 85B
setup.py 1KB
README.md 45KB
共 33 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- postgresql-42.7.3.jar
- 2024-05-21 20-36-43.mkv
- 基于QT+C++的智能云监护仪项目,能够实时显示使用者心电、血氧、血压波形及其它各种参数+源码(毕业设计&课程设计&项目开发)
- 基于java开发的app接收硬件端传输的心音信号,具有显示心音波形,发出心音的功能+源码(毕业设计&课程设计&项目开发)
- Python 程序语言设计模式思路-行为型模式:职责链模式:将请求从一个处理者传递到下一个处理者
- 9241703124789646.16健身系统2.apk
- postgresql-16.3-1-windows-x64.exe
- Python 程序语言设计模式思路-结构型模式:装饰器讲解及利用Python装饰器模式实现高效日志记录和性能测试
- 基于YOLOv5和DeepSORT的多目标跟踪仿真与记录
- Python 程序语言设计模式思路-创建型模式:原型模式:通过复制现有对象来创建新对象,面向对象编程
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功