aiowpi 0.1.8
Async Python client for the World of Warships API.
License: MIT
Requires Python: >=3.8
Keywords: async, wows, api, client, aiolimiter

# AIOWPI

## aiohttp based world of warship api
### [中文说明](https://github.com/Int-0X7FFFFFFF/aiowpi/blob/master/README_zh.md)

[![Python 3.8](https://img.shields.io/badge/Python-3.8_|_3.9_|_3.10_|_3.11_|_3.12-blue?style=flat-square&logo=python&logoColor=white)](https://www.python.org/downloads/)
[![GitHub file size in bytes](https://img.shields.io/github/languages/code-size/Int-0X7FFFFFFF/aiowpi?label=Size&logo=hack-the-box&logoColor=white&style=flat-square)](https://github.com/Int-0X7FFFFFFF/aiowpi)
[![PyPI](https://img.shields.io/pypi/v/aiowpi?color=%233775A9&label=PyPI&logo=pypi&logoColor=white&style=flat-square)](https://pypi.org/project/aiowpi/)
[![License](https://img.shields.io/github/license/ArkoClub/async-pixiv?label=License&style=flat-square&logo=data:image/svg+xml;base64,PHN2ZyB0PSIxNjUxMjEyODQ2ODY0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjE1MDAiIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48cGF0aCBkPSJNOTQ3LjIgOTIxLjZsLTg3MC40IDBjLTQyLjM0MjQgMC03Ni44LTM0LjQ1NzYtNzYuOC03Ni44bDAtNjY1LjZjMC00Mi4zNDI0IDM0LjQ1NzYtNzYuOCA3Ni44LTc2LjhsODcwLjQgMGM0Mi4zNDI0IDAgNzYuOCAzNC40NTc2IDc2LjggNzYuOGwwIDY2NS42YzAgNDIuMzQyNC0zNC40NTc2IDc2LjgtNzYuOCA3Ni44ek03Ni44IDE1My42Yy0xNC4xMzEyIDAtMjUuNiAxMS40Njg4LTI1LjYgMjUuNmwwIDY2NS42YzAgMTQuMTMxMiAxMS40Njg4IDI1LjYgMjUuNiAyNS42bDg3MC40IDB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I1MDAiIGhlaWdodD0iNTAwIj48cGF0aCBkPSJNOTU3LjU0MzkzNyA5NjEuMTMxMTM3IDYyLjg2NTI4MSA5NjEuMTMxMTM3IDYyLjg2NTI4MSA2NTUuNTA5NDg1IDE4OC4yOTgwNjIgNjU1LjUwOTQ4NSAxODguMjk4MDYyIDg1OS4yNDI1ODYgODMyLjE2MDI3NSA4NTkuMjQyNTg2IDgzMi4xNjAyNzUgNjU1LjUwOTQ4NSA5NTcuNTQzOTM3IDY1NS41MDk0ODVaIiBwLWlkPSI1MTYzIiBmaWxsPSIjZmZmZmZmIj48L3BhdGg%2BPHBhdGggZD0iTTc1My4yNzg3MTcgMzYzLjI3ODgxNyA1MTAuMTgwMDUgNzkwLjc0MTQ0NSAyNjcuMDMzMjg3IDM2My4yNzg4MTdaIiBwLWlkPSI1MTY0IiBmaWxsPSIjZmZmZmZmIj48L3BhdGg%2BPHBhdGggZD0iTTQzNC44OTEzMiA2NC4zNTY3NWwxNTAuNTI4MzQyIDAgMCAzMDAuMjU5NTI4LTE1MC41MjgzNDIgMCAwLTMwMC4yNTk1MjhaIiBwLWlkPSI1MTY1IiBmaWxsPSIjZmZmZmZmIj48L3BhdGg%2BPC9zdmc%2B&style=flat-square)](https://pypi.org/project/aiowpi/)
[![View](https://hits.sh/github.com/Int-0X7FFFFFFF/aiowpi.svg?color=7AA3CC&style=flat-square&label=View&logo=data:image/svg+xml;base64,PHN2ZyB0PSIxNjUyMjU5MTQ0MjAzIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjM0NjkiIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48cGF0aCBkPSJNNTEyIDQxNmE5NiA5NiAwIDEgMCAwIDE5MiA5NiA5NiAwIDAgMCAwLTE5MnogbTUxMS45NTIgMTAyLjA2NGMtMC4wMTYtMC40N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i41OTIgMCAwIDAgMC4xMjgtMS4wODhjMC4wNjQtMC4zMDQgMC4wOTYtMC42MjQgMC4xMjgtMC45MjhsMC4wOC0wLjY1NiAwLjA5Ni0xLjI4YzAuMDMyLTAuNjU2IDAuMDQ4LTEuMjk2IDAuMDQ4LTEuOTUybC0wLjA5Ni0xLjk2OHpNNTEyIDcwNGMtMTA2LjAzMiAwLTE5Mi04NS45NTItMTkyLTE5MnM4NS45NTItMTkyIDE5Mi0xOTIgMTkyIDg1Ljk2OCAxOTIgMTkyYzAgMTA2LjA0OC04NS45NjggMTkyLTE5MiAxOTJ6IiBwLWlkPSIzNDcwIiBmaWxsPSIjZmZmZmZmIj48L3BhdGg+PC9zdmc+)](https://hits.sh/github.com/Int-0X7FFFFFFF/aiowpi)


`aiowpi` is an asynchronous Python library for interacting with the World of Warships API. It simplifies making API calls to fetch player and warship data across different regions.

## Features

- Async support for making efficient API requests
- Easy-to-use interface for fetching player and ship information
- Supports multiple World of Warships servers (NA, EU, ASIA, RU(maybe))
- Support reatelimter

## Installation

You can install `aiowpi` via pip:

```bash
pip install aiowpi
```

## Quick start
Below is an example of how to use aiowpi to search player id use nick name:

```python
import asyncio
from aiowpi import WPIClient, WOWS_ASIA

async def main():
    # Get from wg api full guid
    # Server applications. Request limit per second is set to 20 requests per second.
    # Standalone applications. The limit is set on the number of requests sent from one IP address at the same time and in general equal to 10 requests per second.
    wows_api = WPIClient(
                application_id = "your_application_id",
                max_rate=10,
                rate_time_period=1,
    )
    
    # Search for a player on the Asia server
    player_info = await wows_api.player.search(WOWS_ASIA, "your nick name")
    print(player_info)
asyncio.run(main())
```

## Dynamic types
Below is an example of how to use aiowpi to fetch player information:

```python
import asyncio
from aiowpi import WPIClient, WOWS_ASIA

async def main():
    wows_api = WPIClient(application_id = "your_application_id")
    
    # get a player info on the Asia server
    player_info = await wows_api.player.person_data(WOWS_ASIA, 123456)
    print(player_info)
asyncio.run(main())
```

But some time you may want get more than one user

```python
import asyncio
from aiowpi import WPIClient, WOWS_ASIA

async def main():
    wows_api = WPIClient(application_id = "your_application_id")
    
    # get players info on the Asia server
    player_info = await wows_api.player.person_data(WOWS_ASIA, (123, 456, 789))
    print(player_info)
asyncio.run(main())
```

### [reference](https://github.com/ArkoClub/async-pixiv/blob/main/README.md)