Unofficial Python bindings for the Fantrax API. The goal is to make interaction with the API as easy as possible while emulating the endpoints as much as possible
pip install fantraxapi
Documentation can be found at Read the Docs.
To connect to the Fantrax API you use the FantraxAPI object.
from fantraxapi import FantraxAPI
league_id = "96igs4677sgjk7ol"
api = FantraxAPI(league_id)
import fantraxapi
api = fantraxapi.FantraxAPI()
Example: Get the Scores for the Season.
from fantraxapi import FantraxAPI
league_id = "96igs4677sgjk7ol"
api = FantraxAPI(league_id)
for _, scoring_period in api.scoring_periods().items():
print("")
print(scoring_period)
- Source is available on the Github Project Page.
- Contributors to FantraxAPI own their own contributions and may distribute that code under the MIT license.