Python API wrapper for FotMob undocumented API
Project description
FotMob API Wrapper
A comprehensive Python wrapper for the FotMob API with built-in proxy support for bypassing restrictions.
Installation
pip install fotmob-wrapper
Quick Start
import asyncio
from fotmob import FotMob
import json
async def main():
async with FotMob() as fotmob:
# Search for players
players = await fotmob.search_player("saka")
print(json.dumps(players, indent = 4))
# Get today's matches
matches = await fotmob.live_games()
print(json.dumps(matches, indent = 4))
# Get Premier League standings
standings = await fotmob.standings(47)
print(json.dumps(standings, indent = 4))
asyncio.run(main())
Features
-
✅ Automatic proxy token handling and caching
-
✅ Full coverage of FotMob API endpoints
-
✅ Async/await support
-
✅ Type hints throughout
-
✅ Error handling and fallback mechanisms
-
✅ Image URL generators for teams, players, and leagues
API Methods
Search Methods
await fotmob.search("query") # General search
await fotmob.search_player("player name")
await fotmob.search_team("team name")
await fotmob.search_league("league name")
League Methods
await fotmob.get_league(47) # League details (47 = Premier League)
await fotmob.get_league_current_season(47) # League current season
await fotmob.standings(47) # League table
await fotmob.get_league_news(47) # League news
await fotmob.get_league_fixtures(47, "2024/2025") # Season fixtures
await fotmob.totw_rounds(47, "2024/2025") # TOTW rounds
await fotmob.totw(47, "2024/2025", 1) # Team of the Week
await fotmob.get_league_next_fixture(47) # Next unplayed fixture
Team Methods
await fotmob.get_team(9825) # Team details (9825 = Arsenal)
await fotmob.get_team_news(9825) # Team news
await fotmob.get_team_fixtures(9825) # Team fixtures
await fotmob.get_team_stats(9825, 27110) # Team tournament stats
await fotmob.get_team_next_fixture(9825) # Next unplayed fixture
await fotmob.get_team_last_fixture(9825) # Last finished fixture
await fotmob.get_team_next_fixtures(9825) # Next unplayed fixtures
await fotmob.get_team_last_fixtures(9825) # Last finished fixtures
Player Methods
await fotmob.get_player(664500) # Player details
await fotmob.player_stats(664500) # Player statistics
Match Methods
await fotmob.get_matches_by_date("20241225") # Matches by date
await fotmob.get_notable_matches() # Notable matches
await fotmob.get_match(4813416) # Match details
await fotmob.get_match_odds(4813416) # Match odds
await fotmob.get_tv_listings(4813416, "GB") # TV listings
await fotmob.get_match_details(4813416) # Match Details (further match info)
await fotmob.get_match_highlight_video(4813416) # Match Highlight Video URL
await fotmob.get_match_comments(4813416) # Match Live running comments, play by play.
Utility Methods
await fotmob.todays_games() # Today's matches (convenience method)
await fotmob.live_games() # Live matches (convenience method)
await fotmob.get_fixture_difficulty(47) # Fixture difficulty
await fotmob.get_historical_table(9825) # Historical table
# Image URLs (no API call needed)
fotmob.get_team_logo(9825) # Team logo URL
fotmob.get_league_logo(47) # League logo URL
fotmob.get_player_image(664500) # Player image URL
fotmob.get_nation_logo("ENG") # Nation logo URL
Debugging
import logging
logging.basicConfig(level=logging.DEBUG)
async with FotMob() as fotmob:
# Debug information will be logged
await fotmob.todays_games()
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
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 fotmob_wrapper-0.0.5.tar.gz.
File metadata
- Download URL: fotmob_wrapper-0.0.5.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4526072528df5a9b5b5239a6490c522b399d45bde864a685d447ef15ccbdcf76
|
|
| MD5 |
4d1f47ceeff1bd0723d49f6d3eac9909
|
|
| BLAKE2b-256 |
5ab53010c3f2030b14b07df0278cd5c9064c477647f42e70c96e64e15db54c4a
|
File details
Details for the file fotmob_wrapper-0.0.5-py3-none-any.whl.
File metadata
- Download URL: fotmob_wrapper-0.0.5-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8938541d6cf2361c286303d51595acf7e105ce81cd220c4e950e780e71b7066e
|
|
| MD5 |
32abb557b3d7d4ca1d76dab96b9c4c15
|
|
| BLAKE2b-256 |
775f0bfc3ded5c7762255dec490f1f2b185729297aa8d296ccd292e34c371754
|