Typed Python client for the IFPA (International Flipper Pinball Association) API
Project description
IFPA API Client
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
- Documentation: https://johnsosoka.github.io/ifpa-api-python/
- PyPI Package: https://pypi.org/project/ifpa-api/
- GitHub Repository: https://github.com/johnsosoka/ifpa-api-python
- Issue Tracker: https://github.com/johnsosoka/ifpa-api-python/issues
- IFPA API Documentation: https://api.ifpapinball.com/docs
- Maintainer: open.source@sosoka.com
- Website: johnsosoka.com
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f657b1e1770672d14659db762df7b9c161a23dc248e92b0ce3e85bada3b2c8fb
|
|
| MD5 |
08f1aeefc8ef1e30d167dcc30c4a1c91
|
|
| BLAKE2b-256 |
f4c1d5f4854a579f2db934cf7b2353dd970587e2eaa173792f9d8196b3048713
|
Provenance
The following attestation bundles were made for ifpa_api-0.2.1.tar.gz:
Publisher:
publish.yml on johnsosoka/ifpa-api-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ifpa_api-0.2.1.tar.gz -
Subject digest:
f657b1e1770672d14659db762df7b9c161a23dc248e92b0ce3e85bada3b2c8fb - Sigstore transparency entry: 702240762
- Sigstore integration time:
-
Permalink:
johnsosoka/ifpa-api-python@970386e55849e04121a16fadc24f701b0faf87b2 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/johnsosoka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@970386e55849e04121a16fadc24f701b0faf87b2 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0e6f922278cf2e01f880dc4fc0121f03a4f2c592ae791447ff3d6f96af6159a
|
|
| MD5 |
402e10d5be38ace04406d09937ea8511
|
|
| BLAKE2b-256 |
385cb69a97d5ba09a860081da940c7a3c6a23bbe6c1a6bda1ef3306421387be3
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ifpa_api-0.2.1-py3-none-any.whl -
Subject digest:
d0e6f922278cf2e01f880dc4fc0121f03a4f2c592ae791447ff3d6f96af6159a - Sigstore transparency entry: 702240763
- Sigstore integration time:
-
Permalink:
johnsosoka/ifpa-api-python@970386e55849e04121a16fadc24f701b0faf87b2 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/johnsosoka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@970386e55849e04121a16fadc24f701b0faf87b2 -
Trigger Event:
push
-
Statement type: