Skip to main content

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

Metadata

Release files for WarEraAPI 0.6.34

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

Source distribution (sdist)

Source distribution for WarEraAPI 0.6.34
File Size Uploaded Provenance Actions
wareraapi-0.6.34.tar.gz 25.8 kB Without provenance Details for wareraapi-0.6.34.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for WarEraAPI 0.6.34
File Interpreter ABI Platform Actions
wareraapi-0.6.34-py3-none-any.whl Python 3 none any Details for wareraapi-0.6.34-py3-none-any.whl

Total release size: 65.6 kB

Release files / wareraapi-0.6.34.tar.gz

Download URL wareraapi-0.6.34.tar.gz
Size 25.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2e9ea751d88d9b15e51e9fee339f41a23b1ad4c2187865d9f919eb2fb76123e9
BLAKE2b-256 checksum
How to use checksums
a1b0bef3a71ae8118be9a94e978f7ac2ff267223846416d31acfd9898ec51b21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / wareraapi-0.6.34-py3-none-any.whl

Download URL wareraapi-0.6.34-py3-none-any.whl
Size 39.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a87fea1814586ff531ae0396ebc67e38075307aeea5f6df09798f30dbaabd797
BLAKE2b-256 checksum
How to use checksums
55975f7cf490d50283c5897989e3466e363ee6a40534da1d340cd8d36dcf9d67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Security for WarEraAPI 0.6.34

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.

Release history Release notifications | RSS feed

This release

0.6.34 This release

2 release files No provenance

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