Instant stats for your fantasy football league.
Project description
leeger
Instant stats for your fantasy football league.
Supported Fantasy Sites
Sites that you can automatically load your league data from.
Name | Website | Supported |
---|---|---|
ESPN | https://www.espn.com/fantasy/football/ | :heavy_check_mark: |
MyFantasyLeague | http://home.myfantasyleague.com/ | :x: |
NFL | https://fantasy.nfl.com/ | :x: |
Sleeper | https://sleeper.com/fantasy-football | :heavy_check_mark: |
Yahoo | https://football.fantasysports.yahoo.com/ | :heavy_check_mark: |
If a fantasy site you use is not listed here and you would like it to be, please open an issue.
Installation
Use the package manager pip to install.
pip install leeger
Usage
For examples on how to utilize the different features of this library, see
the example
folder.
League Loaders
ESPN
Examples
League Info Needed [PUBLIC]
- League ID
League Info Needed [PRIVATE]
- League ID
- ESPN_S2 parameter
- SWID parameter
How to find your ESPN league ID.
To retrieve ESPN_S2 and SWID, follow these steps:
- Visit your main league page ( i.e. https://fantasy.espn.com/football/team?leagueId={your_league_id}seasonId={any_season})
- Make sure you are logged in.
- Open Developer Tools (on Chrome/Firefox, right-click anywhere on the page and select Inspect Element)
- Go to Storage (for Firefox) or Application (for Chrome) and browse the Cookies available for fantasy.espn.com
- The values you need are called "SWID" and "ESPN_S2". You can right-click and copy the values from here.
Sleeper
Examples
League Info Needed
- League ID
How to find your Sleeper league ID.
Yahoo
Examples
League Info Needed
- League ID
- Client ID
- Client secret
How to find your Yahoo league ID.
To set up your Yahoo account, follow these steps:
- Register a new application on the Yahoo Developer Site
- Retrieve the Client ID and Client secret for the application
- Set the callback/redirect URI of the application to: https://localhost:8000
- Make sure the application has READ permissions
Notes
- When the Yahoo League Loader is run, Yahoo OAuth will open up a new tab in a browser. You can close this tab.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Credit
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.