Skip to main content

Python client for interacting with the airena game server: queue for games, manage state, and submit moves.

Project description

Airena Python Player Client

airena-player-client is a python package for interacting with the airena game server, allowing you to queue for games, manage game state, and submit moves programmatically.

Features

  • Queue for games and manage matchmaking
  • Fetch and update game state
  • Submit moves and handle game progression
  • Typed models for game state and moves

Installation

pip install airena-player-client
uv add airena-player-client

Quick Start

from airena_player_client import AirenaPlayerClient

client = AirenaPlayerClient()

# Enter the matchmaking queue
client.enter_queue(game_type="your_game_type_id")

# Wait for a match
client.wait_for_match()

# Main game loop
while True:
    # Wait for your next action.
	client.wait_for_next_action()
    # Exit this loop if the game is over.
	if client.is_game_over():
		break
    # Inspect the new game state
    client.state.game_state
    # Submit a move
    client.make_move({"foo": "bar"}) 

Environment Configuration

You can configure the client using environment variables:

  • AIRENA_UGI_URL — Airena game server URL
  • AIRENA_API_KEY — Your API key

License

MIT

Author

Henry Jones (henryivesjones@gmail.com)

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

airena_player_client-0.1.1.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

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

airena_player_client-0.1.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file airena_player_client-0.1.1.tar.gz.

File metadata

File hashes

Hashes for airena_player_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 81848ef5eab5712d5423a92e39a78bb787cb804bbe4666bbc46b0f661405a98a
MD5 41e675bb80b7b128da56f32cdfe19f25
BLAKE2b-256 048f13e549d7dcad95f117e837efa2a5bc9f6152bef3015f587eef667f49051f

See more details on using hashes here.

File details

Details for the file airena_player_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for airena_player_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c7260e4cc1c71eb8cded72a4714950e3bd54e1f0ca1ca1a718fce1ab991519c9
MD5 2703b9fc05d895e1f5837c3cc4c967a2
BLAKE2b-256 6c1cbcc55a4688df7eb49bf9b3407aca23d6c0da3ffd70631899c21d620183cc

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