# AIOWPI
## aiohttp based world of warship api
### [中文说明](https://github.com/Int-0X7FFFFFFF/aiowpi/blob/master/README_zh.md)
[](https://www.python.org/downloads/)
[](https://github.com/Int-0X7FFFFFFF/aiowpi)
[](https://pypi.org/project/aiowpi/)
[](./LICENSE)
[](https://pypi.org/project/aiowpi/)
[](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)
Raw data
{
"_id": null,
"home_page": null,
"name": "aiowpi",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "async, wows, api, client, aiolimiter",
"author": null,
"author_email": "INTMAX <INT_MAX@hotmail.com>",
"download_url": "https://files.pythonhosted.org/packages/a7/2d/a09a77702571cd763f639399d64466da3d652d52bf05a23b7fbd4100459a/aiowpi-0.1.7.tar.gz",
"platform": null,
"description": "# AIOWPI\n\n## aiohttp based world of warship api\n### [\u4e2d\u6587\u8bf4\u660e](https://github.com/Int-0X7FFFFFFF/aiowpi/blob/master/README_zh.md)\n\n[](https://www.python.org/downloads/)\n[](https://github.com/Int-0X7FFFFFFF/aiowpi)\n[](https://pypi.org/project/aiowpi/)\n[](./LICENSE)\n\n[](https://pypi.org/project/aiowpi/)\n[](https://hits.sh/github.com/Int-0X7FFFFFFF/aiowpi)\n\n\n`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.\n\n## Features\n\n- Async support for making efficient API requests\n- Easy-to-use interface for fetching player and ship information\n- Supports multiple World of Warships servers (NA, EU, ASIA, RU(maybe))\n- Support reatelimter\n\n## Installation\n\nYou can install `aiowpi` via pip:\n\n```bash\npip install aiowpi\n```\n\n## Quick start\nBelow is an example of how to use aiowpi to search player id use nick name:\n\n```python\nimport asyncio\nfrom aiowpi import WPIClient, WOWS_ASIA\n\nasync def main():\n # Get from wg api full guid\n # Server applications. Request limit per second is set to 20 requests per second.\n # 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.\n wows_api = WPIClient(\n application_id = \"your_application_id\",\n max_rate=10,\n rate_time_period=1,\n )\n \n # Search for a player on the Asia server\n player_info = await wows_api.player.search(WOWS_ASIA, \"your nick name\")\n print(player_info)\nasyncio.run(main())\n```\n\n## Dynamic types\nBelow is an example of how to use aiowpi to fetch player information:\n\n```python\nimport asyncio\nfrom aiowpi import WPIClient, WOWS_ASIA\n\nasync def main():\n wows_api = WPIClient(application_id = \"your_application_id\")\n \n # get a player info on the Asia server\n player_info = await wows_api.player.person_data(WOWS_ASIA, 123456)\n print(player_info)\nasyncio.run(main())\n```\n\nBut some time you may want get more than one user\n\n```python\nimport asyncio\nfrom aiowpi import WPIClient, WOWS_ASIA\n\nasync def main():\n wows_api = WPIClient(application_id = \"your_application_id\")\n \n # get players info on the Asia server\n player_info = await wows_api.player.person_data(WOWS_ASIA, (123, 456, 789))\n print(player_info)\nasyncio.run(main())\n```\n\n### [reference](https://github.com/ArkoClub/async-pixiv/blob/main/README.md)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Async Python client for the World of Warships API.",
"version": "0.1.7",
"project_urls": {
"homepage": "https://github.com/Int-0X7FFFFFFF/aiowpi",
"repository": "https://github.com/Int-0X7FFFFFFF/aiowpi"
},
"split_keywords": [
"async",
" wows",
" api",
" client",
" aiolimiter"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c37f5eeaaa14c7d612ec32aa13dd640b34cb1a27b66e5b291d1704198b2d95fb",
"md5": "ca5a657b0debd642a1f9176077595d3a",
"sha256": "23e7dfd297f90a5a66a1861af72a2f635e5f70145326cff588ef3cd8ca18cf13"
},
"downloads": -1,
"filename": "aiowpi-0.1.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ca5a657b0debd642a1f9176077595d3a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 8929,
"upload_time": "2025-01-23T14:36:02",
"upload_time_iso_8601": "2025-01-23T14:36:02.282656Z",
"url": "https://files.pythonhosted.org/packages/c3/7f/5eeaaa14c7d612ec32aa13dd640b34cb1a27b66e5b291d1704198b2d95fb/aiowpi-0.1.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a72da09a77702571cd763f639399d64466da3d652d52bf05a23b7fbd4100459a",
"md5": "5e2eb456baa629b49b8bc1364c94dc2d",
"sha256": "78ddbd325372713e0c2e9f66c321314aec59bb00efe16983439deb8c599ea5e1"
},
"downloads": -1,
"filename": "aiowpi-0.1.7.tar.gz",
"has_sig": false,
"md5_digest": "5e2eb456baa629b49b8bc1364c94dc2d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 12735,
"upload_time": "2025-01-23T14:36:03",
"upload_time_iso_8601": "2025-01-23T14:36:03.700602Z",
"url": "https://files.pythonhosted.org/packages/a7/2d/a09a77702571cd763f639399d64466da3d652d52bf05a23b7fbd4100459a/aiowpi-0.1.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-23 14:36:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Int-0X7FFFFFFF",
"github_project": "aiowpi",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "aiohappyeyeballs",
"specs": [
[
"==",
"2.4.0"
]
]
},
{
"name": "aiohttp",
"specs": [
[
"==",
"3.10.5"
]
]
},
{
"name": "aiolimiter",
"specs": [
[
"==",
"1.1.0"
]
]
},
{
"name": "aiosignal",
"specs": [
[
"==",
"1.3.1"
]
]
},
{
"name": "attrs",
"specs": [
[
"==",
"24.2.0"
]
]
},
{
"name": "click",
"specs": [
[
"==",
"8.1.7"
]
]
},
{
"name": "frozenlist",
"specs": [
[
"==",
"1.4.1"
]
]
},
{
"name": "idna",
"specs": [
[
"==",
"3.10"
]
]
},
{
"name": "multidict",
"specs": [
[
"==",
"6.1.0"
]
]
},
{
"name": "mypy-extensions",
"specs": [
[
"==",
"1.0.0"
]
]
},
{
"name": "packaging",
"specs": [
[
"==",
"24.1"
]
]
},
{
"name": "pathspec",
"specs": [
[
"==",
"0.12.1"
]
]
},
{
"name": "platformdirs",
"specs": [
[
"==",
"4.3.6"
]
]
},
{
"name": "yarl",
"specs": [
[
"==",
"1.11.1"
]
]
}
],
"lcname": "aiowpi"
}