Metadata-Version: 2.1
Name: tibia.py
Version: 6.1.0
Summary: API that parses website content into python data.
Author-email: Allan Galarza <allan.galarza@gmail.com>
Maintainer-email: Allan Galarza <allan.galarza@gmail.com>
License: Apache 2.0
Project-URL: Homepage, https://tibiapy.readthedocs.io/
Project-URL: Documentation, https://tibiapy.readthedocs.io/
Project-URL: Repository, https://github.com/Galarzaa90/tibia.py
Project-URL: Changelog, https://tibiapy.readthedocs.io/en/latest/changelog.html
Project-URL: GitHub: Issues, https://github.com/Galarzaa90/tibia.py/issues
Project-URL: Coverage: Codecov, https://app.codecov.io/gh/Galarzaa90/tibia.py
Project-URL: Docker Hub: Repo, https://hub.docker.com/repository/docker/galarzaa90/tibia.py
Project-URL: SonarCloud, https://sonarcloud.io/dashboard?id=Galarzaa90_tibia.py
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Pydantic :: 2
Classifier: Framework :: Pydantic
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python
Classifier: Topic :: Games/Entertainment :: Role-Playing
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development
Classifier: Topic :: Text Processing :: Markup :: HTML
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp-socks
Requires-Dist: aiohttp>=3.8
Requires-Dist: beautifulsoup4>=4.0
Requires-Dist: html5lib>=1.1
Requires-Dist: lxml>=4.3.5
Requires-Dist: pydantic~=2.0
Requires-Dist: typing_extensions
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: autodoc-pydantic>=2.0.0; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
Provides-Extra: server
Requires-Dist: fastapi~=0.101; extra == "server"
Requires-Dist: uvicorn; extra == "server"
Provides-Extra: testing
Requires-Dist: aioresponses; extra == "testing"
Requires-Dist: asynctest; extra == "testing"
Requires-Dist: coverage[toml]; extra == "testing"
Requires-Dist: packaging; extra == "testing"
Provides-Extra: linting
Requires-Dist: flake8; extra == "linting"
Requires-Dist: flake8-aaa; extra == "linting"
Requires-Dist: flake8-assertive; extra == "linting"
Requires-Dist: flake8-bugbear; extra == "linting"
Requires-Dist: flake8-clean-block; extra == "linting"
Requires-Dist: flake8-commas; extra == "linting"
Requires-Dist: flake8-comprehensions; extra == "linting"
Requires-Dist: flake8-docstrings; extra == "linting"
Requires-Dist: flake8-eradicate; extra == "linting"
Requires-Dist: flake8-html; extra == "linting"
Requires-Dist: flake8-length; extra == "linting"
Requires-Dist: flake8-literal; extra == "linting"
Requires-Dist: flake8-multiline-containers; extra == "linting"
Requires-Dist: flake8-picky-parentheses; extra == "linting"
Requires-Dist: flake8-pyproject; extra == "linting"
Requires-Dist: flake8-return; extra == "linting"
Requires-Dist: flake8-rst-docstrings; extra == "linting"
Requires-Dist: flake8-simplify; extra == "linting"
Requires-Dist: flake8-type-checking; extra == "linting"
Requires-Dist: flake8-use-fstring; extra == "linting"
Requires-Dist: flake8-secure-coding-standard; extra == "linting"
Requires-Dist: ruff; extra == "linting"

# 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.

![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Galarzaa90/tibia.py/build.yml)
[![codecov](https://codecov.io/gh/Galarzaa90/tibia.py/branch/master/graph/badge.svg?token=mS9Wxv6O2F)](https://codecov.io/gh/Galarzaa90/tibia.py)
[![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)


**Features:**

- Converts data into well-structured Python objects.
- Type consistent attributes.
- All objects can be converted to JSON strings.
- Can be used with any networking library.
- Support for characters, guilds, houses and worlds, tournaments, forums, etc.

## Installing
Install and update using pip

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

Installing the latest version form GitHub

```commandline
pip install git+https://github.com/Galarzaa90/tibia.py.git -U
```

## Usage
This library is composed of two parts, parsers and an asynchronous request client.

The asynchronous client (`tibiapy.Client`) contains methods to obtain information from Tibia.com.

The parsing methods allow you to get Python objects given the html content of a page.

```python
import tibiapy

# Asynchronously
import aiohttp

async def get_character(name):
    url = tibiapy.urls.get_character_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.urls.get_character_url(name)
    
    r = requests.get(url)
    content = r.text
    character = tibiapy.Character.from_content(content)
    return character

```

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