A lightweight and easy-to-use wrapper that allows you to extract data from FIFA.com and more.
From PyPI
No available.
From source code (clone it)
git clone https://github.com/manucabral/pyfifa.git
From GithubCLI
gh repo clone manucabral/pyfifa
Using the ranking.
import pyfifa
ranking = pyfifa.Ranking()
for item in ranking.items():
print(item.rank, item.name)
Extra: change lang and limit items.
ranking = pyfifa.Ranking(lang="fr", limit=5)
Exporting (json or csv)
ranking.export(extension="json", filename="ranking")
Fetching ranking ids.
import pyfifa
for rankingId in pyfifa.ranking_ids():
print("ID", rankingId.value, "Date", rankingId.date)
Fetching a certain ranking id.
import pyfifa
rankingIds = pyfifa.ranking_ids()
# Get the first FIFA ranking id
lastRankingId = rankingIds[-1]
ranking = pyfifa.Ranking(id=lastRankingId)
All constributions, bug reports or fixes and ideas are welcome.