Metadata-Version: 2.1
Name: tibia.py
Version: 0.1.0a3
Summary: API that parses website content into python data.
Home-page: https://github.com/Galarzaa90/tibia.py
Author: Galarzaa90
Author-email: allan.galarza@gmail.com
License: Apache 2.0
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Games/Entertainment :: Role-Playing
Classifier: Topic :: Internet
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Text Processing :: Markup :: HTML
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown
Requires-Dist: beautifulsoup4
Requires-Dist: lxml

# Tibia.py
An API to parse Tibia.com content into object oriented data.

No fetching is done by this module, you must provide the html content.

![Travis (.org)](https://img.shields.io/travis/Galarzaa90/tibia.py.svg)
[![GitHub (pre-)release](https://img.shields.io/github/release/Galarzaa90/tibia.py/all.svg)](https://github.com/Galarzaa90/tibiawiki-sql/releases)
[![PyPI](https://img.shields.io/pypi/v/tibia.py.svg)](https://pypi.python.org/pypi/tibia.py/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tibia.py.svg)
![PyPI - License](https://img.shields.io/pypi/l/tibia.py.svg)

## Installing
Install and update using pip

```commandline
pip install tibia.py
```

## Usage
In order to use this library, you need to use an external library (`requests`, `aiohttp`) to fetch content from the website.

```python
import tibiapy

# Asynchronously
import aiohttp

async def get_character(name):
  url = tibiapy.Character.get_url(name)

  async with aiohttp.ClientSession() as session:
    async with session.get(url) as resp:
    content = await resp.text()
  character = tibiapy.Character.from_content(content)
  return character

# Synchronously
import requests

def get_character_sync(name):
  url = tibiapy.Character.get_url(name)

  r = requests.get(url)
  content = r.text()
  character = tibiapy.Character.from_content(content)
  return character
```

## Documentation
https://tibiapy.readthedocs.io/

