Skip to main content

Typed Python client for the IFPA (International Flipper Pinball Association) API

Project description

IFPA API Python

PyPI version Python versions License: MIT CI codecov Documentation Code style: black AI Code Review

Unofficial Python client for the IFPA (International Flipper Pinball Association) API.

Access player rankings, tournament data, and statistics through a clean, type-safe Python interface with Pydantic validation.

Installation

pip install ifpa-api

Requires Python 3.11+.

Quick Start

from ifpa_api import IfpaClient

# Initialize (uses IFPA_API_KEY environment variable)
client = IfpaClient()

# Get player by ID
player = client.player.get(2643)
print(f"{player.first_name} {player.last_name}")

# Access stats
stats = player.player_stats["system"]["open"]
print(f"WPPR Rank: {stats['current_rank']}")

# Search with filters
results = client.player.search("John") \
    .country("US") \
    .state("CA") \
    .limit(10) \
    .get()

# Get rankings
rankings = client.rankings.wppr(count=100)
for entry in rankings.rankings[:10]:
    print(f"{entry.rank}. {entry.player_name}")

# Get tournament results
results = client.tournament(67890).results()
for result in results.results[:5]:
    print(f"{result.position}. {result.player_name}: {result.points} pts")

Features

  • Type-safe: Full type hints and Pydantic validation with IDE autocomplete
  • Fluent API: Chainable query builder for complex searches
  • 46 Endpoints: Complete IFPA API v2.1 coverage across 7 resources
  • Automatic Pagination: Memory-efficient iteration with .iterate() and .get_all()
  • Enhanced Errors: Structured exceptions with request context for debugging
  • 99% Test Coverage: Comprehensive unit and integration tests

Resources

  • Players — Search, profiles, rankings, tournament results, head-to-head
  • Tournaments — Search, details, results, formats
  • Rankings — WPPR, women, youth, country, age-based
  • Series — Circuit standings, player cards, region data
  • Stats — Overall metrics, largest tournaments, player activity
  • Directors — Search, tournament listings

Documentation

Full documentation: https://johnsosoka.github.io/ifpa-api-python/

AI Code Review

All pull requests are automatically reviewed by GPT-4o via ai-code-review. The AI checks for code quality, security issues, performance concerns, and maintainability.

Reviews run on every PR open and update. Results are posted as inline comments on the pull request.

License

MIT License — see LICENSE file.


Not affiliated with or endorsed by IFPA.

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

ifpa_api-0.4.7.tar.gz (53.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ifpa_api-0.4.7-py3-none-any.whl (73.8 kB view details)

Uploaded Python 3

File details

Details for the file ifpa_api-0.4.7.tar.gz.

File metadata

  • Download URL: ifpa_api-0.4.7.tar.gz
  • Upload date:
  • Size: 53.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ifpa_api-0.4.7.tar.gz
Algorithm Hash digest
SHA256 c0d9a9bfc1ab630bc73f05f3fe2caa9cbda083365a46ab9a187407db567a1b88
MD5 b09496aab37ca058f88e5e60786fc047
BLAKE2b-256 0480df5522cd07ebc7f213bfc3d76edeaa02ea6e03cb96c3bdc699f3f9540b1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifpa_api-0.4.7.tar.gz:

Publisher: publish.yml on johnsosoka/ifpa-api-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ifpa_api-0.4.7-py3-none-any.whl.

File metadata

  • Download URL: ifpa_api-0.4.7-py3-none-any.whl
  • Upload date:
  • Size: 73.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ifpa_api-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4a05f1ff74736385588a4b978d901b9d1ad95352774f081e0b2f71a4597a96fa
MD5 e26f488e89484a00d4c00b7cb5a42545
BLAKE2b-256 74a9173f16ac98b01917e8b84c9677d2297ef1c2a4323594ed14b8bf59e7c015

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifpa_api-0.4.7-py3-none-any.whl:

Publisher: publish.yml on johnsosoka/ifpa-api-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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