1
0
Fork 0
mirror of synced 2026-12-06 18:32:26 +00:00
No description
Find a file
Parker Wahle 3d7339d387
Refuse a TODO or FIXME without its issue in pre-commit
A local pygrep hook, todo-needs-issue: a TODO or FIXME is written TODO(#N), naming its GitHub issue, under regulad/skills' Tracking work rule. It skips Markdown and this config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mv4cZ2TAgLi4RirGrVaqXv
2026-11-22 20:55:21 -05:00
.github Extend the shared settings from regulad/.github 2026-11-22 11:07:52 -05:00
src/aiosplatoon3ink Add an asyncio client and pydantic models for splatoon3.ink's feeds 2026-11-16 04:59:14 -05:00
tests Add an asyncio client and pydantic models for splatoon3.ink's feeds 2026-11-16 04:59:14 -05:00
.gitignore Add an asyncio client and pydantic models for splatoon3.ink's feeds 2026-11-16 04:59:14 -05:00
.pre-commit-config.yaml Refuse a TODO or FIXME without its issue in pre-commit 2026-11-22 20:55:21 -05:00
LICENSE Relicense under the AGPL-3.0, like PepperCord 2026-11-16 05:05:49 -05:00
poetry.lock Add an asyncio client and pydantic models for splatoon3.ink's feeds 2026-11-16 04:59:14 -05:00
pyproject.toml Relicense under the AGPL-3.0, like PepperCord 2026-11-16 05:05:49 -05:00
README.md Relicense under the AGPL-3.0, like PepperCord 2026-11-16 05:05:49 -05:00

aiosplatoon3ink

An asyncio client for the Splatoon 3 data that splatoon3.ink publishes, with typed, immutable pydantic models of each feed.

from datetime import UTC, datetime

from aiosplatoon3ink import Splatoon3InkClient
from aiosplatoon3ink.schedules import BankaraMode

async with Splatoon3InkClient("MyBot/1.0 (+https://github.com/me/mybot)") as client:
    schedules = await client.schedules()

now = datetime.now(UTC)
rotation = next(node for node in schedules.bankara_schedules if node.is_active(now))
if (series := rotation.setting(BankaraMode.SERIES)) is not None:
    print(series.vs_rule.name, [stage.name for stage in series.vs_stages])

Feeds

Method Feed Returns
schedules() schedules.json Every battle and Salmon Run rotation, Challenge events, and the current Splatfest
festivals() festivals.json Every Splatfest and its results, in each of the four regions
gear() gear.json Gear on sale at SplatNet's shop
monthly_gear() coop.json The month's Salmon Run reward gear

The models follow SplatNet 3's field names in snake_case, so vsStages becomes vs_stages. Where SplatNet's internal names differ from the game's, the enums use the game's: VsRuleKey.TOWER_CONTROL is "LOFT", and BankaraMode.SERIES is "CHALLENGE". Fields about splatoon3.ink's own Nintendo account are left out, and fields the models don't know are ignored. Each method raises aiohttp.ClientError when a request fails, and pydantic.ValidationError when a feed has a shape the models don't expect.

The translations under data/locale/ and the X Rank leaderboards aren't modelled yet.

Using splatoon3.ink's data

splatoon3.ink's terms ask that you:

  • credit splatoon3.ink wherever you show its data;
  • fetch each feed at most once an hour, since that's how often it updates, and cache it in between;
  • send a User-Agent that says how to reach you, which the client requires;
  • keep whatever you build free of charge.

Installing

It isn't on PyPI. Install it from git, pinned to a commit:

poetry add "git+https://github.com/regulad/aiosplatoon3ink.git#<commit>"

Developing

poetry install --with type
poetry run pytest              # against the snapshots in tests/fixtures
poetry run pytest -m live      # against splatoon3.ink's feeds as they are now
poetry run mypy src tests
poetry run pre-commit run --all-files

License

AGPL-3.0. The data belongs to Nintendo, and reaches you through SplatNet 3 and splatoon3.ink.