Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

pypm install python-weewar

How to install python-weewar

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install python-weewar
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.3.1 Available View build log
0.3 Failed View build log
Windows (64-bit)
0.3.1 Available View build log
0.3 Failed View build log
Mac OS X (10.5+)
0.3.1 Available View build log
0.3 Failed View build log
Linux (32-bit)
0.3.1 Available View build log
0.3 Failed View build log
Linux (64-bit)
0.3.1 Available View build log
0.3 Failed View build log
Lastest release
version 0.3.1 on Jan 5th, 2011

Weewar (http://weewar.com) is an "Award winning turn based multiplayer strategy game". Apart from being highly addictive, it provides 2 APIs:

  • one read-only API for players and
  • a bot API called ELIZA

Further documentation on both is available at http://weewar.wikispaces.com/api.

This module aims enables you to conveniently call each of these API functions from within your python script.

Available API calls

The following functions are supplied:

  • game(id) returns the status of a game and gives information about the participating players.
  • open_games() returns all currently available open games as a list of IDs.
  • all_users() returns a list of all users who have been online in the last 7 days, including their current ranking.
  • user(username) Returns detailed information about a single user, including everything that is visible on the profile page and the games the user is participating in.
  • latest_maps() returns the latest published maps including urls for previews, images, and other details.
  • headquarter(username, apikey) returns all games that are listed in your Headquarters. Includes information about the id, the url, the state, and the name of the game. An attribute is added if the game is in need of attention, e.g: its the users turn or the game is not yet started or the user is invited to this game (requires authentication).
  • game_state(username, apikey, id) offers more information about the state of a game (requires authentication).
  • map_layout(id) returns complete map layout.

Each game can also be controlled via these commands (which are part of the ELIZA API):

  • finish_turn(username, apikey, id) finishes turn in game.
  • accept_invitation(username, apikey, id) accepts invitation to a game.
  • decline_invitation(username, apikey, id) declines invitation to a game.
  • send_reminder(username, apikey, id) sends a reminder about the game.
  • surrender_game(username, apikey, id) surrenders!
  • abandon_game(username, apikey, id) abondons a game.
  • remove_game(username, apikey, id) removes a game.
  • chat(username, apikey, game_id, msg) sends a chat message to the game board.
  • build_unit(username, apikey, game_id, (x, y), unit) sends a chat message to the game board.
  • unit_move_options(username, apikey, game_id, unit, (x, y)) requests unit movement options. This is pretty much like what you get when you select a unit in a regular game.
  • unit_attack_options(username, apikey, game_id, unit, (x, y), moved=None) requests possible targets. The 'moved' attribute is optional and describes the number of turns a unit has already moved. This is helpful for Jets and Battleships.
  • move_unit(username, apikey, game_id, unit, from, to) moves a unit.
  • attack_with(username, apikey, game_id, unit, from, target) attacks target with unit at specified location.
  • capture_base(username, apikey, game_id, unit, at) captures a base with unit. You have to move there first!
  • repair_unit(username, apikey, game_id, unit, at) repairs a unit.


Some of the provided functions require a username and a password. Use your Weewar account username and the API token accessible via http://weewar.com/apiToken.


The code for this module is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3.

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:7

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.