Skip to content
/ leeger Public
forked from joeyagreco/leeger

Instant stats for your fantasy football league.

License

Notifications You must be signed in to change notification settings

Jhl44/leeger

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leeger logo

Instant stats for your fantasy football league.

Main Build Last Commit

Table of Contents

Overview

This library allows you to take data from an existing fantasy football league and get instant stats from that league into either a Python script or an Excel spreadsheet.

This library supports multiple fantasy sites AND manual league data input.

Python stats will be stored in these objects:

Excel sheets will include:

  • A tab with stats for each year the league has existed
  • A tab with all-time stats for the league
  • Sortable rows for each team and owner


The main idea behind this library is:

  1. Load stats into a League object
  2. Pass this League object into various library methods to extract stats


For guides on how to use this library, see the information under Supported League Loaders and in the example folder.

FAQ

Question: How do I use this library to pull stats from my online fantasy league?

Answer:

  1. Find your fantasy site here and ensure you have everything you need for the site you are using
  2. Follow the example code snippets for your fantasy site to load the League object

Q: How can I get stats into Excel once I have my League object?

A: Follow this example code.


Q: Can I combine years from different fantasy sites that are loaded as separate League objects into a single League object?

A: Yes, the League object supports addition (+) to combine multiple league objects.
An example of this can be found here.


Q: Can I disable validation on my League object?

A: Yes. While it is not recommended that you disable this, as validation ensures the stats are calculated properly, disabling validation can be done by passing validate=False into any method that takes a League object.

Installation

Use the package manager pip to install.

pip install leeger

Supported League Loaders

Sites that you can automatically load your league data from.

Name Website Supported Setup Documentation
ESPN https://www.espn.com/fantasy/football/ ✔️ ESPN 📄
Fleaflicker https://www.fleaflicker.com/ ✔️ Fleaflicker 📄
MyFantasyLeague http://home.myfantasyleague.com/ ✔️ MyFantasyLeague 📄
NFL https://fantasy.nfl.com/
Sleeper https://sleeper.com/fantasy-football/ ✔️ Sleeper 📄
Yahoo https://football.fantasysports.yahoo.com/ ✔️ Yahoo 📄

If a fantasy site you use is not listed here and you would like it to be, please open an issue.

Stats Explained

Stats used in this library are documented here.

Running Tests

To run tests, run the following command:

  pytest

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

MIT

Credit

About

Instant stats for your fantasy football league.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%