Metadata-Version: 2.4
Name: igaming-tools
Version: 0.1.0
Summary: Python client for the iGaming Tools API: slots, providers, regulators, news, jobs and search demand
Author-email: iGaming Tools <hello@i-gaming.tools>
License-Expression: MIT
Project-URL: Homepage, https://i-gaming.tools/
Project-URL: Documentation, https://i-gaming.tools/docs/
Project-URL: API Reference, https://i-gaming.tools/docs/openapi.json
Project-URL: MCP Server, https://mcp.i-gaming.tools/mcp
Project-URL: Status, https://statuspage.i-gaming.tools/
Keywords: igaming,slots,gambling-data,data-api,rest-api,openapi,mcp
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# igaming-tools

Python client for the [iGaming Tools API](https://i-gaming.tools/) — structured
data about the online gambling industry: slot games, providers, regulators,
industry news, vacancies and country-level search demand.

The data is not scraped from other catalogues. Each game's demo is opened in a
headless browser, screenshotted, and its paytable read with OCR, so the client
exposes fields that exist nowhere else: RTP configurations that differ by
market, bet limits, bonus mechanics, symbol roles, extracted colour palettes,
and an accessibility review for colour blindness and screen readers.

No third-party dependencies — standard library only.

## Install

```bash
pip install igaming-tools
```

Python 3.10 or newer.

## Quick start

```python
from igaming_tools import Client

api = Client("YOUR_TOKEN")          # or set IGAMING_TOOLS_TOKEN

# One page of results
page = api.slots.list(mechanic="cluster", page_size=50)
print(len(page), "slots,", "more pages" if page.next else "last page")

# Every page, as one stream
for slot in api.slots.list(has_bonus_buy=True).follow():
    print(slot["slug"], slot.get("provider"))

# A single game, with the capture data attached
slot = api.slots.get("sweet-bonanza")

# Monthly search demand per country, 24 months back
demand = api.slots.demand("sweet-bonanza", months=24)
```

Get a token at [i-gaming.tools/account/](https://i-gaming.tools/account/). The
free tier is 10,000 requests a month and needs no card.

## What you can query

| Resource | Methods |
|---|---|
| `api.slots` | `list`, `get`, `demand`, `ids` |
| `api.providers` | `list`, `get`, `slots`, `news`, `jobs`, `team`, `demand`, `ids` |
| `api.regulators` | `list`, `get`, `news` |
| `api.news` | `list`, `get`, `stats` |
| `api.jobs` | `list`, `get`, `stats` |
| `api.demand` | `list` |
| `api.series` | `list`, `get` |
| `api.themes` | `list` |
| `api.features` | `list` |
| `api.sources` | `list`, `get` |
| `api.stats` | `get` |

Filters are passed as keyword arguments and go straight to the API, so a new
query parameter works without upgrading this package. Every method accepts
`etag=` for conditional requests.

## Incremental sync

Lists are cursor-paginated and support `updated_since`, so a nightly job pulls
only what changed. Collections also answer `304 Not Modified` when you send the
ETag from the previous run:

```python
from igaming_tools import Client, NOT_MODIFIED

api = Client()
page = api.providers.list(page_size=200)
# ... later, same collection
again = api.providers.list(page_size=200, etag=page.etag)
if again is NOT_MODIFIED:
    print("nothing changed, no quota spent on parsing")
```

For reconciliation — finding what was deleted upstream — `api.slots.ids()` and
`api.providers.ids()` return identifiers only.

## Errors

```python
from igaming_tools import AuthError, NotFound, QuotaExceeded, RateLimited

try:
    api.slots.get("no-such-game")
except NotFound as exc:
    print(exc.status, exc.detail)
except QuotaExceeded:
    print("monthly allowance spent — this is not a rate limit")
except RateLimited as exc:
    print("retry after", exc.retry_after)
except AuthError:
    print("check the token")
```

Everything this package raises derives from `IGamingToolsError`, including a
body that fails to parse: a proxy error page is a `TransportError`, never an
empty result.

`429` and `5xx` are retried with backoff (`max_retries`, default 3), honouring
`Retry-After`. Other `4xx` statuses are raised immediately.

## Also available

- **MCP server, no key and no registration:** `https://mcp.i-gaming.tools/mcp`
  — 17 tools, Streamable HTTP, for agents that should query the data directly.
- **Live demo sandbox:** [demo.i-gaming.tools](https://demo.i-gaming.tools/) —
  1,150 games embeddable with a single iframe, no token.
- **API docs and OpenAPI spec:** [i-gaming.tools/docs/](https://i-gaming.tools/docs/)
- **Status and uptime:** [statuspage.i-gaming.tools](https://statuspage.i-gaming.tools/)

## Two things worth knowing

`follow()` refuses to walk forever: a repeated page or more than `max_pages`
raises instead of ending quietly, because a silent stop looks exactly like a
complete export.

The token travels only to the host in `base_url`, and a redirect that leaves
that host is refused rather than followed. Note that `urllib` honours the
`http_proxy` and `https_proxy` environment variables — the JavaScript client
does not.

## A note on what this is

iGaming Tools is a data API, not a casino and not an affiliate: we run no games
and take no bets. Gambling is the vertical the data describes.

MIT licensed.
