API wrapper for Fantasy Premier League
Project description
FPL API
This is a simple python API wrapper for the Fantasy Premier League game. It scrapes the official FPL site to retrieve data and present it in JSON format.
Documentation
The API design is inspired by the Fantasy Premier League API Endpoints: A Detailed Guide by Frenzel Timothy. The guide shows all endpoint that are implemented in this API wrapper.
Installation
Run the following command to download the most recent release:
pip install git+https://github.com/C-Roensholt/fpl-api.git
To install a specific version:
pip install git+https://github.com/C-Roensholt/fpl-api.git@v0.0.1
Usage
A basic example of how to use the API could be:
from fplapi import fplAPI
# Initialize API connection
client = fplAPI()
# Extract metadata
fpl_data = client.get_fpl_data()
fixtures = client.get_fixtures()
# Get first 10 players data
player_detailed_data_list = []
for player in fpl_data["elements"][:10]:
player_detailed_data = client.get_player_detailed_data(element_id=player["id"])
player_detailed_data_list.append(player_detailed_data)
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 fpl-api-0.0.4.tar.gz.
File metadata
- Download URL: fpl-api-0.0.4.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0aa1f3df2177d804203e60dbd8bd2afa01a5e2654e0080f801b121b9f3542391
|
|
| MD5 |
c32723cbaf753415ae6f7ce41e4832d3
|
|
| BLAKE2b-256 |
610b61456afe9e920af2fbaae0581d4c75540dbfe145df55669de9ccc4321fd5
|
File details
Details for the file fpl_api-0.0.4-py3-none-any.whl.
File metadata
- Download URL: fpl_api-0.0.4-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
670bfe57d4885c2cd4da8827732f89696e82a4aff0d3940b580a4baf451cac8c
|
|
| MD5 |
05d22bef2fbc26bfe6f3610333211b30
|
|
| BLAKE2b-256 |
e0d40400ab064376e7e83b10bc9aee41c24a435cb3d8cf222cb2818790762ed1
|