A lightweight Python library for The Fantrax API.
Project description
Welcome to Fantrax Documentation!
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.1.tar.gz
(7.4 kB
view hashes)
Built Distribution
Close
Hashes for fantraxapi-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61fb838f328aaeba5c06da0d8fb07a2d286a9cb381a5bf5f3e35986104f747f9 |
|
MD5 | fa2bc33bcfcbd768e7be9d5f9168a294 |
|
BLAKE2b-256 | efb6610d83cd4a2480390b7d42eb619f6763a5affd1929e94d5ca2a701a0314c |