Skip to main content

Add your description here

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.0.tar.gz (12.7 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.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for airena_player_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 645f03d69158fca7e4fe189cddbb4cdd843dc94605f301edeb622965cc9ff857
MD5 c33d49e2161a792c36767af691670c67
BLAKE2b-256 0f6cf12655b8b4789b2a9eadd5224dc5e010e33a0fb6e50c460890668c769f56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for airena_player_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d29eeed8cae290c88813d64e74778cb1492968fdeddf7e33df0e8e8400f45f37
MD5 8cd004314c550bc840f3b6fbbd8cad8a
BLAKE2b-256 2f89be9d52ba9c961e9ae920d9073c6643934cb73997cea6361a1fa91c52a589

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