Metadata-Version: 2.4
Name: yew
Version: 0.12.1
Summary: An OldSchool RuneScape API wrapper for Python.
Project-URL: Homepage, https://github.com/bharat-nair/yew
Project-URL: Issues, https://github.com/bharat-nair/yew/issues
Author-email: Bharat Nair <bharat@rubberducker.xyz>
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: Games/Entertainment :: Role-Playing
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Requires-Dist: certifi==2024.2.2
Requires-Dist: charset-normalizer==3.3.2
Requires-Dist: idna==3.6
Requires-Dist: mwparserfromhell==0.6.6
Requires-Dist: requests==2.31.0
Requires-Dist: urllib3==2.2.1
Description-Content-Type: text/markdown

# ![yew-logs](https://oldschool.runescape.wiki/images/thumb/Yew_logs_detail.png/32px-Yew_logs_detail.png) yew

`yew` is an OldSchool RuneScape API wrapper for Python. It lets you invoke entities of OSRS as Python objects.

## Installation

Install from PyPi:

```
pip install yew
```

You can also install the development version from the repository as:

```
pip install git+https://github.com/bharat-nair/yew.git@development
```

## Usage

Fetch an item:

```
from yew.item import Item

rune_scimmy = Item.from_id(1333)
rune_scimmy.examine     # "A vicious, curved sword."
rune_scimmy.highalch    # 15360
```

Fetch the latest prices:

```
prices = rune_scimmy.prices(interval="latest")
prices.high_price		# '15.1k'
str(prices.high_price_time)		# '2024-04-04 12:12:12'
```

Fetch a player:

```
from yew.player import Player

lynx_titan = Player("Lynx Titan")
lynx_titan.cooking.level	# 99
lynx_titan.cooking.xp		# 200000000
```

Fetch an NPC (uses data from the [OSRS Wiki](https://oldschool.runescape.wiki/)):

```
from yew.npc import Npc

edgeville_master = Npc.from_wiki("Vannaka")
edgeville_master.name # 'Vannaka'
edgeville_master.race # 'Human'
edgeville_master.examine # 'He looks dangerous'
edgeville_master.locations # ['Edgeville Dungeon']

rodent = Npc.from_wiki("Rat")
rodent.examine # 'Apopular dwarven delicacy'
rodent.level # 1
rodent.aggresive # False
rodent.hitpoints # 2
rodent.attack # 1
rodent.strength # 1
```

## Contributing

All contributions are welcome! If you would like to propose a new feature or raise a bug you have encountered, please create a new Github issue. Make sure to provide a concise title and a descriptive description, going over the aspects of your feature or bug.

If you would like to contribute to the development of `yew`, all relevant PRs are welcome.
To get started:

- Fork this repository.
- Install dependencies by running:
  ```
  pip install -r requirements.txt
  ```
  Note that it might be beneficial to create a Python virtual environment to keep your local dependencies clean.
- Raise a PR to the `development` branch, once you have made your changes and pushed them.
