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 URLAIRENA_API_KEY— Your API key
License
MIT
Author
Henry Jones (henryivesjones@gmail.com)
Release files for airena-player-client 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| airena_player_client-0.1.1.tar.gz | 12.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| airena_player_client-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.7 kB
Release files / airena_player_client-0.1.1.tar.gz
| Download URL | airena_player_client-0.1.1.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
81848ef5eab5712d5423a92e39a78bb787cb804bbe4666bbc46b0f661405a98a
|
|
BLAKE2b-256 checksum How to use checksums |
048f13e549d7dcad95f117e837efa2a5bc9f6152bef3015f587eef667f49051f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.2
|
Release files / airena_player_client-0.1.1-py3-none-any.whl
| Download URL | airena_player_client-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7260e4cc1c71eb8cded72a4714950e3bd54e1f0ca1ca1a718fce1ab991519c9
|
|
BLAKE2b-256 checksum How to use checksums |
6c1cbcc55a4688df7eb49bf9b3407aca23d6c0da3ffd70631899c21d620183cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.2
|