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

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.6.34.tar.gz (25.8 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.6.34-py3-none-any.whl (39.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wareraapi-0.6.34.tar.gz
Algorithm Hash digest
SHA256 2e9ea751d88d9b15e51e9fee339f41a23b1ad4c2187865d9f919eb2fb76123e9
MD5 18f9039ce0687e04d495d24799958809
BLAKE2b-256 a1b0bef3a71ae8118be9a94e978f7ac2ff267223846416d31acfd9898ec51b21

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wareraapi-0.6.34-py3-none-any.whl
  • Upload date:
  • Size: 39.8 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.6.34-py3-none-any.whl
Algorithm Hash digest
SHA256 a87fea1814586ff531ae0396ebc67e38075307aeea5f6df09798f30dbaabd797
MD5 b7b5f897191111b9a782ec931564d241
BLAKE2b-256 55975f7cf490d50283c5897989e3466e363ee6a40534da1d340cd8d36dcf9d67

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.35

2 files

This release

0.6.34 This release

2 files

0.6.33

2 files

0.6.32

2 files

0.6.31

2 files

0.6.30

2 files

0.6.29

2 files

0.6.28

2 files

0.6.27

2 files

0.5.27

2 files

0.4.27

2 files

0.4.26

2 files

0.4.25

2 files

0.4.24

2 files

0.4.23

2 files

0.4.22

2 files

0.4.21

2 files

0.3.21

2 files

0.3.20

2 files

0.3.19

2 files

0.3.18

2 files

0.2.17

2 files

0.2.15

2 files

0.2.14

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

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