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, with significant and breaking changes being released as we work towards v1.0.0, which will be considered our stable release.

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

You can contribute by:

  • Reporting bugs
  • Feature Requests
  • General Feedback (usability, docs, etc.)

Contributing Code

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 worldwide 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.2.tar.gz (32.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.2.2-py3-none-any.whl (42.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ifpa_api-0.2.2.tar.gz
  • Upload date:
  • Size: 32.6 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.2.tar.gz
Algorithm Hash digest
SHA256 9be28646566b2b4df631e4d181fc4ceef6c8a9554aaa1792ca1b1359d81b7ec5
MD5 be5f12a7250cb65eaf9844bbd8e94fe1
BLAKE2b-256 cb99164729fce3dade38aefa6c05aff3dc3461004eb491cb7b9e1df3b83b8d27

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ifpa_api-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 42.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2d69390314a47733b03faeebbfdb88c5e13766973f9b1deba4bee2b6ccf8a90d
MD5 59975cb127b8b3051e21a5093fd242f8
BLAKE2b-256 dca73512cab614cef69e3fc36db93bdc58ebf4641f57a6e23e0eded89c26cd77

See more details on using hashes here.

Provenance

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