fantraxapi

A lightweight Python library for The Fantrax API.


Keywords
fantraxapi, fantrax, fantasy, wrapper, api
License
MIT
Install
pip install fantraxapi==0.2.7

Documentation

Welcome to Fantrax Documentation!

GitHub release (latest by date) Build Testing Build Coverage GitHub commits since latest release (by date) for a branch PyPI Downloads Wiki Discord Reddit GitHub Sponsors Sponsor or Donate

Overview

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

Installation & Documentation

pip install fantraxapi

Documentation can be found at Read the Docs.

Using the API

Getting a FantraxAPI Instance

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()

Usage Examples

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)

Usage & Contributions

  • Source is available on the Github Project Page.
  • Contributors to FantraxAPI own their own contributions and may distribute that code under the MIT license.