Async Python client for the World of Warships API.
Project description
AIOWPI
aiohttp based world of warship api
中文说明
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:
pip install aiowpi
Quick start
Below is an example of how to use aiowpi to search player id use nick name:
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:
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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiowpi-0.1.8.tar.gz.
File metadata
- Download URL: aiowpi-0.1.8.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ce94ec33314fc6c3968f7b8cc23b12483a6ca9c234d46d0f9bfc22d5a51d0f3
|
|
| MD5 |
336a5273a150ca09c44678360f97bf5a
|
|
| BLAKE2b-256 |
e6c11bd3dfc0f3fc060e2920d0fc7e3b09fc936eea4a56d1bb33ae899bd3de5f
|
Provenance
The following attestation bundles were made for aiowpi-0.1.8.tar.gz:
Publisher:
release.yml on Int-0X7FFFFFFF/aiowpi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiowpi-0.1.8.tar.gz -
Subject digest:
5ce94ec33314fc6c3968f7b8cc23b12483a6ca9c234d46d0f9bfc22d5a51d0f3 - Sigstore transparency entry: 167036071
- Sigstore integration time:
-
Permalink:
Int-0X7FFFFFFF/aiowpi@8185dc4eaad6bc4f27d31d8322df46f338e52008 -
Branch / Tag:
refs/tags/V0.1.8 - Owner: https://github.com/Int-0X7FFFFFFF
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8185dc4eaad6bc4f27d31d8322df46f338e52008 -
Trigger Event:
release
-
Statement type:
File details
Details for the file aiowpi-0.1.8-py3-none-any.whl.
File metadata
- Download URL: aiowpi-0.1.8-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd89a384ced298f3fb6584b3be803c54263c172d9fdaadf2afb3e209e59d9fc9
|
|
| MD5 |
4f5fe49d7f70aeaa0f7f502f12fba599
|
|
| BLAKE2b-256 |
0639393baa5caed16604ff95f41f3e4f9a9ef95f88996b92ec1aa1af329a8661
|
Provenance
The following attestation bundles were made for aiowpi-0.1.8-py3-none-any.whl:
Publisher:
release.yml on Int-0X7FFFFFFF/aiowpi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiowpi-0.1.8-py3-none-any.whl -
Subject digest:
fd89a384ced298f3fb6584b3be803c54263c172d9fdaadf2afb3e209e59d9fc9 - Sigstore transparency entry: 167036073
- Sigstore integration time:
-
Permalink:
Int-0X7FFFFFFF/aiowpi@8185dc4eaad6bc4f27d31d8322df46f338e52008 -
Branch / Tag:
refs/tags/V0.1.8 - Owner: https://github.com/Int-0X7FFFFFFF
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8185dc4eaad6bc4f27d31d8322df46f338e52008 -
Trigger Event:
release
-
Statement type: