{"id":34104004,"url":"https://github.com/joeyagreco/leeger","last_synced_at":"2025-12-14T17:57:39.506Z","repository":{"id":37019713,"uuid":"495229406","full_name":"joeyagreco/leeger","owner":"joeyagreco","description":"Instant stats for any fantasy football league.","archived":false,"fork":false,"pushed_at":"2024-12-25T19:29:34.000Z","size":2114,"stargazers_count":78,"open_issues_count":12,"forks_count":22,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-28T10:22:19.403Z","etag":null,"topics":["espn","espn-fantasy-api","espn-fantasy-football","fantasy-football","fantasy-football-api","fleaflicker","fleaflicker-fantasy-api","fleaflicker-fantasy-football","football","myfantasyleague","nfl","sleeper","sleeper-fantasy-api","sleeper-fantasy-football","statistical-analysis","statistics","stats","yahoo","yahoo-fantasy-api","yahoo-fantasy-football"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/leeger","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeyagreco.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-23T02:10:42.000Z","updated_at":"2025-09-15T00:08:08.000Z","dependencies_parsed_at":"2023-02-16T00:31:11.123Z","dependency_job_id":"85ee223f-e3c0-4005-bb7d-6648706c1acc","html_url":"https://github.com/joeyagreco/leeger","commit_stats":{"total_commits":762,"total_committers":2,"mean_commits":381.0,"dds":0.01049868766404205,"last_synced_commit":"c1c80584d9db0db2f5b9fda93448d9be032050a0"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/joeyagreco/leeger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyagreco%2Fleeger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyagreco%2Fleeger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyagreco%2Fleeger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyagreco%2Fleeger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeyagreco","download_url":"https://codeload.github.com/joeyagreco/leeger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyagreco%2Fleeger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27733105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["espn","espn-fantasy-api","espn-fantasy-football","fantasy-football","fantasy-football-api","fleaflicker","fleaflicker-fantasy-api","fleaflicker-fantasy-football","football","myfantasyleague","nfl","sleeper","sleeper-fantasy-api","sleeper-fantasy-football","statistical-analysis","statistics","stats","yahoo","yahoo-fantasy-api","yahoo-fantasy-football"],"created_at":"2025-12-14T17:57:38.888Z","updated_at":"2025-12-14T17:57:39.497Z","avatar_url":"https://github.com/joeyagreco.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/joeyagreco/leeger/main/img/leeger-logo-cropped.png\" alt=\"leeger logo\" width=\"300\"/\u003e\n\nInstant stats for any fantasy football league.\n\n[![PyPi Version](https://img.shields.io/pypi/v/leeger)](https://pypi.org/project/leeger/)\n\u003cbr\u003e\n\u003ca target=\"_blank\" href=\"https://www.python.org/downloads/\" title=\"Python version\"\u003e\u003cimg src=\"https://img.shields.io/badge/python-%3E=_3.10-teal.svg\"\u003e\u003c/a\u003e\n![Last Commit](https://img.shields.io/github/last-commit/joeyagreco/leeger)\n\u003cbr\u003e\n![End-to-end Tests](https://github.com/joeyagreco/leeger/actions/workflows/e2e-tests.yml/badge.svg)\n![Unit Tests](https://github.com/joeyagreco/leeger/actions/workflows/unit-tests.yml/badge.svg)\n![Formatting Check](https://github.com/joeyagreco/leeger/actions/workflows/formatting-check.yml/badge.svg)\n\n\u003c/div\u003e\n\n### Table of Contents\n\n- [Overview](https://github.com/joeyagreco/leeger#overview)\n- [Quickstart Guide](https://github.com/joeyagreco/leeger#quickstart-guide)\n- [FAQ](https://github.com/joeyagreco/leeger#faq)\n- [Installation](https://github.com/joeyagreco/leeger#installation)\n- [Supported League Loaders](https://github.com/joeyagreco/leeger#supported-league-loaders)\n- [Stats Explained](https://github.com/joeyagreco/leeger#stats-explained)\n- [Running Tests](https://github.com/joeyagreco/leeger#running-tests)\n- [Contributing](https://github.com/joeyagreco/leeger#contributing)\n- [License](https://github.com/joeyagreco/leeger#license)\n- [Credit](https://github.com/joeyagreco/leeger#credit)\n\n## Overview\n\n![](https://github.com/joeyagreco/leeger/blob/main/img/leeger-overview-transparent.png)\nThis library allows you to take data from an existing fantasy football league and get instant stats from that league\ninto either a Python script or an Excel spreadsheet.\\\n\\\nThis library supports multiple fantasy sites AND manual league data input.\\\n\\\nPython stats will be stored in these objects:\n\n- [AllTimeStatSheet](https://github.com/joeyagreco/leeger/blob/main/leeger/model/stat/AllTimeStatSheet.py)\n- [YearStatSheet](https://github.com/joeyagreco/leeger/blob/main/leeger/model/stat/YearStatSheet.py)\n\nExcel sheets will include:\n\n- A tab for each year with team stats\n- A tab for each year with matchup info\n- A tab for all-time with team stats\n- A tab for all-time with matchup info\n- A tab for all-time with owner stats\n\n\\\nThe main idea behind this library is:\n\n1. Load stats into a League object\n2. Pass this League object into various library methods to extract stats\n\n\\\nFor guides on how to use this library, see the information\nunder [Supported League Loaders](https://github.com/joeyagreco/leeger#supported-league-loaders) and\nin the [`example`](https://github.com/joeyagreco/leeger/tree/main/example) folder.\n\n## Quickstart Guide\n\n#### 1. Download Python\n\n- Download the latest _supported_ version of Python [here](https://www.python.org/downloads/release/python-3109/).\n- Currently, Python version 3.10+ is supported\n\n#### 2. Create a basic Python file to use this library\n\n- Create a file that ends in the extension \".py\"\n  - Example: _my_script.py_\n\n#### 3. Download this library\n\n- Navigate in your terminal to the directory where you created your Python script in Step 2\n- Run the command `pip install leeger`\n  - If you do not have [pip](https://pip.pypa.io/en/stable/) installed, you will need to install it\n\n#### 4. Download your league data using a league loader\n\n- Find the site/s you use for fantasy football [here](https://github.com/joeyagreco/leeger#supported-league-loaders)\n- Follow the **Setup Documentation**\n- Once you have everything you need for your selected site/s, use the code examples\n  found [here](https://github.com/joeyagreco/leeger/tree/main/example/league_loader) for your specific site/s to\n  download your league data\n  - You can put the code inside the Python script you created in Step 2\n- If you have leagues that are continued in multiple sites, you can pull from multiple sites and add the League objects\n  together to combine the different sites\n  - An example of this can be\n    found [here](https://github.com/joeyagreco/leeger/blob/main/example/league/combiningLeagues.py)\n\n#### 5. Run your script\n\n- Navigate in your terminal to the directory where you created your Python script in Step 2\n- Run the command `py my_script.py`\n  - Replace _my_script.py_ with whatever you named your script in Step 2\n\n#### 6. Load your league stats into Excel\n\n- Slightly alter your script from Step 2 to include a function call to load your league stats into Excel\n- Follow [this example](https://github.com/joeyagreco/leeger/blob/main/example/stat/statsToExcelExample.py)\n- Make sure that you are passing the League object that you pulled from the league loader/s into the function call to\n  put your stats into Excel\n\n## FAQ\n\n**Question:**\nI'm getting this error when I run my script:\n\n\u003c!---\n// @formatter:off\n--\u003e\n\n```python3\nTypeError: dataclass() got an unexpected keyword argument 'kw_only'\n```\n\n\u003c!---\n// @formatter:on\n--\u003e\n\n**Answer:**\nThis error occurs when the Python version you are using is not 3.10 or greater.\\\nMake sure you are using Python version 3.10 or a newer version.\n\n---\n\n**Q:**\nHow do I use this library to pull stats from my online fantasy league?\n\n**A:**\n\n1. Find your fantasy site [here](https://github.com/joeyagreco/leeger#supported-league-loaders) and ensure you have\n   everything you need for the site you are using\n2. Follow the [example code snippets](https://github.com/joeyagreco/leeger/tree/main/example/league_loader) for your\n   fantasy site to load the League object\n\n---\n\n**Q:**\nHow can I get stats into Excel once I have my League object?\n\n**A:**\nFollow [this example code](https://github.com/joeyagreco/leeger/blob/main/example/stat/statsToExcelExample.py).\n\n---\n\n**Q:**\nCan I combine years from different fantasy sites that are loaded as separate League objects into a single League object?\n\n**A:**\nYes, the League object supports addition (+) to combine multiple league objects.\\\nAn example of this can be\nfound [here](https://github.com/joeyagreco/leeger/blob/main/example/league/combiningLeagues.py).\n\n---\n\n**Q:**\nCan I disable validation on my League object?\n\n**A:**\nYes. While it is not recommended that you disable this, as validation ensures the stats are calculated properly,\ndisabling validation can be done by passing `validate=False` into any method that takes a League object OR any `loadLeague()` method from a League Loader.\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install.\n\n```bash\npip install leeger\n```\n\n## Supported League Loaders\n\nSites that you can automatically load your league data from.\n\n| Name            | Website                                   | Supported          | Setup Documentation                                                                                                       |\n| --------------- | ----------------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------- |\n| ESPN            | https://www.espn.com/fantasy/football/    | :heavy_check_mark: | [ESPN :page_facing_up:](https://github.com/joeyagreco/leeger/blob/main/doc/league_loader/espn.md)                         |\n| Fleaflicker     | https://www.fleaflicker.com/              | :heavy_check_mark: | [Fleaflicker :page_facing_up:](https://github.com/joeyagreco/leeger/blob/main/doc/league_loader/fleaflicker.md)           |\n| MyFantasyLeague | http://home.myfantasyleague.com/          | :heavy_check_mark: | [MyFantasyLeague :page_facing_up:](https://github.com/joeyagreco/leeger/blob/main/doc/league_loader/my_fantasy_league.md) |\n| NFL             | https://fantasy.nfl.com/                  | :x:                | :x:                                                                                                                       |\n| Sleeper         | https://sleeper.com/fantasy-football/     | :heavy_check_mark: | [Sleeper :page_facing_up:](https://github.com/joeyagreco/leeger/blob/main/doc/league_loader/sleeper.md)                   |\n| Yahoo           | https://football.fantasysports.yahoo.com/ | :heavy_check_mark: | [Yahoo :page_facing_up:](https://github.com/joeyagreco/leeger/blob/main/doc/league_loader/yahoo.md)                       |\n\n\u003c!---\n// @formatter:off\n--\u003e\n\nIf a fantasy site you use is not listed here and you would like it to be, please [open an issue](https://github.com/joeyagreco/leeger/issues/new/choose).\n\n\u003c!---\n// @formatter:on\n--\u003e\n\n## Stats Explained\n\nStats used in this library are\ndocumented [here](https://github.com/joeyagreco/leeger/blob/main/doc/stats.md).\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## Development\n\n_Run these commands from the root folder_\n\n- Format Code: `make fmt`\n- Run Unit Tests: `make test`\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n## Credit\n\n- [ESPN API](https://github.com/cwendt94/espn-api)\n- [ESPN Private Leagues](https://cran.r-project.org/web/packages/ffscrapr/vignettes/espn_authentication.html)\n- [fleaflicker](https://github.com/joeyagreco/fleaflicker)\n- [pymfl](https://github.com/joeyagreco/pymfl)\n- [sleeper](https://github.com/joeyagreco/sleeper)\n- [YahooFantasy](https://github.com/mattdodge/yahoofantasy)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeyagreco%2Fleeger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeyagreco%2Fleeger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeyagreco%2Fleeger/lists"}