# SAIR Competition Public API — Python examples

Runnable examples for the SAIR Competition Public API. The "client" is a single file — copy it into your own code rather than importing it.

## Install

Python ≥ 3.10. Only runtime dependency is [`httpx`](https://www.python-httpx.org/).

```bash
python -m venv .venv
source .venv/bin/activate
pip install -e .
```

## Run an example

```bash
export SAIR_API_KEY="sair_..."
export SAIR_COMPETITION_ID="modular-arithmetic-challenge"

python -m sair.examples.quick_start
python -m sair.examples.submit_competition
python -m sair.examples.submit_igp24
python -m sair.examples.practice_cheatsheet
python -m sair.examples.practice_solver
python -m sair.examples.contributor_network
```

The IGP24 submit example defaults to polynomial lines from the public LMFDB baseline in [`lmfdb-polynomials.txt`](./lmfdb-polynomials.txt). Set `SAIR_IGP24_LINES_FILE` to submit a different local file. Blank and full-line `#` comments are skipped; trailing comments, including `# poly_disc_primes=[...]`, are preserved.

Each example reads its config from environment variables and is independently runnable. Inspect [`sair/client.py`](./sair/client.py) for the HTTP wrapper.
