Skip to main content

an api client for the online Multiplayer game WarEra written in python (unfinished)

Project description

WarEraAPI (unofficial)

An API client for the online multiplayer game WarEra written in Python.

Overview

WarEraAPI is an asynchronous Python client that provides access to (most of) the WarEra game API. It allows developers to interact with various aspects of the game including companies, battles, users, articles, MUs, and more.

Features

  • Comprehensive API Coverage: Access to most WarEra API endpoints
  • Asynchronous Support: Built with aiohttp for efficient async operations
  • Type Safety: Full type hints and data models for all API responses
  • Pagination Support: Built-in pagination handling for large datasets
  • Rate Limiting Support: yeah, thats it
  • LightWeight: uses dataclasses instead of pydantic

Installation

pip install WarEraAPI

Requirements

  • Python 3.10+
  • aiohttp>=3.13.4

Quick Start

import asyncio
from WarEraAPI import WarEraClient

async def main():
    # Initialize client with API key (optional)
    client = WarEraClient(api_key="your_api_key_here")
    
    # Get user information
    user = await client.get_user(userId="user_id_here")
    print(user)
    
    # Get 3 active battles
    battles = await client.get_battles(limit=3, isActive=True)
    print(battles)
    
    # Get company information
    company = await client.get_company(companyId="company_id_here")
    print(company)

# Run the async function
asyncio.run(main())

Check Documentation!

Development

This project is currently in development and provides access to most of the WarEra API. The full API is not fully documented in the current time so further developments intend to support as much from the api as possible

Currently Unsupported Documented Endpoints

  • battleRanking
    • getRanking
  • itemOffer
    • getById
  • gameConfig
    • getGameConfig
  • mercenaryContractAuction
    • getPaginatedAuctions

Roadmap

  • adding use examples
  • add more abstract/QOL methods
  • implementing the unsupported endpoints
  • documenting types

License

This project is open source and available under the MIT License.

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wareraapi-0.3.20.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wareraapi-0.3.20-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file wareraapi-0.3.20.tar.gz.

File metadata

  • Download URL: wareraapi-0.3.20.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for wareraapi-0.3.20.tar.gz
Algorithm Hash digest
SHA256 0a6ca96ea8baec24b63bc0da6a5ea7ee0efa940e4ddf1703328c02648465568c
MD5 ad8ed9c3231830b8ce85b9289f868520
BLAKE2b-256 5242e73c762272db3254fbc138984ce09213bf70081fd7482be27c170fba5bc6

See more details on using hashes here.

File details

Details for the file wareraapi-0.3.20-py3-none-any.whl.

File metadata

  • Download URL: wareraapi-0.3.20-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for wareraapi-0.3.20-py3-none-any.whl
Algorithm Hash digest
SHA256 9addb4619eefd0cf042e537836b4d2bb38c2bedbc46b2f3d30196a4d5aa09b39
MD5 6647c709db4bb35d2a8b59fe4a354727
BLAKE2b-256 d787bb689ed3481844f8bc1164bf88a931312e5e9f5bdf54261c6a0a3f235d87

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page