Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
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.
You can install aiowpi
via pip:
pip install aiowpi
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())
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())
FAQs
Async Python client for the World of Warships API.
We found that aiowpi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.