Skip to main content

A lightweight Python library for The Fantrax API.

Project description

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.

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

fantraxapi-0.2.7.tar.gz (11.1 kB view hashes)

Uploaded Source

Built Distribution

fantraxapi-0.2.7-py3-none-any.whl (9.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page