Skip to main content
# Warships.py
A Python3 World of Warships API wrapper

Installation instruction:
``pip install wowspy``

Please consult the official documentation [here](https://developers.wargaming.net/reference)

Example usage:
```py
from wowspy import Wows


def example():
api_key = 'YOUR_WOWS_API_KEY'
my_api = Wows(api_key)

# We will search for a player and then get its stats in this example
player_name = 'PotatoSquad'

# Api response from Wargaming
# We only want one result, thus it's specified limit
player_id_response = my_api.players(
my_api.region.NA, player_name, fields='account_id', limit=1)

# Get the player id from the api response
player_id = player_id_response['data'][0]['account_id']

# Now we will use this id to search for the player's stats
# We only want the pvp stats here, it's specified in fields param
player_stats_response = my_api.player_personal_data(
my_api.region.NA, player_id, fields='statistics.pvp')
print(player_stats_response)


if __name__ == '__main__':
example()
```

Example usage(with Aiohttp):
```py
from asyncio import get_event_loop

from aiohttp import ClientSession

from wowspy import WowsAsync


async def example():
api_key = 'YOUR_WOWS_API_KEY'
session = ClientSession()
my_api = WowsAsync(api_key, session)

# We will search for a player and then get its stats in this example
player_name = 'PotatoSquad'

# Api response from Wargaming
# We only want one result, thus it's specified limit
player_id_response = await my_api.players(
my_api.region.NA, player_name, fields='account_id', limit=1)

# Get the player id from the api response
player_id = player_id_response['data'][0]['account_id']

# Now we will use this id to search for the player's stats
# We only want the pvp stats here, it's specified in fields param
player_stats_response = await my_api.player_personal_data(
my_api.region.NA, player_id, fields='statistics.pvp')
print(player_stats_response)


if __name__ == '__main__':
loop = get_event_loop()
loop.run_until_complete(example())
loop.close()

```

Metadata

Release files for wowspy 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wowspy 1.2.0
File Size Uploaded Provenance Actions
wowspy-1.2.0.tar.gz 11.4 kB Without provenance Details for wowspy-1.2.0.tar.gz

Release files / wowspy-1.2.0.tar.gz

Download URL wowspy-1.2.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
45222499f2d0966e88d4ffd4bc620ac130ac27b2edd6e2dacd6b9af3f23c5c34
BLAKE2b-256 checksum
How to use checksums
b82061e4a7bf374b104a01ed191d3194ec3d0212dc150fea453518fde0f31e93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for wowspy 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page