Skip to main content

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

Project description

IFPA API Client

Development Status PyPI version Python versions License: MIT CI codecov Documentation Code style: black

Note: This is an unofficial client library, not affiliated with or endorsed by IFPA.

Full Documentation

Complete documentation is available at: https://johnsosoka.github.io/ifpa-api-python/

A typed Python client for the IFPA (International Flipper Pinball Association) API. Access player rankings, tournament data, and statistics through a clean, modern Python interface with full type safety and Pydantic validation.

Alpha Release: This library is under active development.

Features

  • Fully Typed: Complete type hints for IDE autocompletion and type checking
  • Pydantic Models: Automatic request/response validation with detailed error messages
  • Comprehensive Coverage: 36 IFPA API v2.1 endpoints across 6 resources
  • Fluent Interface: Chainable handle pattern for resource-specific operations
  • Clear Error Handling: Exception hierarchy for different failure scenarios
  • Well Tested: 99% test coverage with unit and integration tests
  • Context Manager Support: Automatic resource cleanup

Installation

pip install ifpa-api

Requires Python 3.11 or higher.

Quick Start

from ifpa_api import IfpaClient

# Initialize client with API key
client = IfpaClient(api_key='your-api-key-here')

# Get player details
player = client.player(2643).get()
print(f"Name: {player.first_name} {player.last_name}")
print(f"Country: {player.country_name}")

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

# Search for tournaments
tournaments = client.tournaments.search(city="Portland", stateprov="OR")
for tournament in tournaments.tournaments[:3]:
    print(f"{tournament.tournament_name} ({tournament.event_date})")

# Close the client when done
client.close()

Using Environment Variable

Alternatively, set the IFPA_API_KEY environment variable and initialize without passing the key:

export IFPA_API_KEY='your-api-key-here'
from ifpa_api import IfpaClient

client = IfpaClient()

Documentation

The complete documentation includes:

  • Getting Started: Installation, authentication, and configuration
  • API Reference: Detailed documentation for all 6 resources (Directors, Players, Rankings, Tournaments, Series, Reference)
  • Usage Examples: Real-world workflows including player analysis, tournament tracking, and ranking comparisons
  • Error Handling: Exception hierarchy and best practices
  • Development Guide: Testing, contributing, and code style guidelines

Visit the full documentation: https://johnsosoka.github.io/ifpa-api-python/

Resources

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for detailed guidelines on:

  • Setting up your development environment
  • Code quality standards (Black, Ruff, mypy)
  • Writing and running tests
  • Submitting pull requests

License

MIT License - Copyright (c) 2025 John Sosoka

See the LICENSE file for details.


Built by John Sosoka for the pinball community.

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.2.1.tar.gz (32.1 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.2.1-py3-none-any.whl (41.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ifpa_api-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f657b1e1770672d14659db762df7b9c161a23dc248e92b0ce3e85bada3b2c8fb
MD5 08f1aeefc8ef1e30d167dcc30c4a1c91
BLAKE2b-256 f4c1d5f4854a579f2db934cf7b2353dd970587e2eaa173792f9d8196b3048713

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifpa_api-0.2.1.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.2.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for ifpa_api-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d0e6f922278cf2e01f880dc4fc0121f03a4f2c592ae791447ff3d6f96af6159a
MD5 402e10d5be38ace04406d09937ea8511
BLAKE2b-256 385cb69a97d5ba09a860081da940c7a3c6a23bbe6c1a6bda1ef3306421387be3

See more details on using hashes here.

Provenance

The following attestation bundles were made for ifpa_api-0.2.1-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