{"id":17381849,"url":"https://github.com/rbarton65/espnff","last_synced_at":"2025-02-27T10:30:50.226Z","repository":{"id":54639428,"uuid":"58597275","full_name":"rbarton65/espnff","owner":"rbarton65","description":"ESPN Fantasy Football API","archived":false,"fork":false,"pushed_at":"2020-10-03T07:05:05.000Z","size":122,"stargazers_count":247,"open_issues_count":26,"forks_count":89,"subscribers_count":42,"default_branch":"master","last_synced_at":"2024-08-09T23:05:22.492Z","etag":null,"topics":["api","espn","espn-fantasy-football","fantasy","football","league"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbarton65.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-12T01:39:17.000Z","updated_at":"2024-08-02T21:33:32.000Z","dependencies_parsed_at":"2022-08-13T22:30:52.997Z","dependency_job_id":null,"html_url":"https://github.com/rbarton65/espnff","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbarton65%2Fespnff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbarton65%2Fespnff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbarton65%2Fespnff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbarton65%2Fespnff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbarton65","download_url":"https://codeload.github.com/rbarton65/espnff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219842826,"owners_count":16556565,"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","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":["api","espn","espn-fantasy-football","fantasy","football","league"],"created_at":"2024-10-16T07:02:01.996Z","updated_at":"2024-10-16T07:04:54.692Z","avatar_url":"https://github.com/rbarton65.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/rbarton65/espnff.svg?branch=master)](https://travis-ci.org/rbarton65/espnff) [![version](https://img.shields.io/badge/version-1.3.1-blue.svg)](https://github.com/rbarton65/espnff/blob/master/CHANGELOG.md) [![PyPI version](https://badge.fury.io/py/espnff.svg)](https://badge.fury.io/py/espnff)\r\n\r\n# ESPN Fantasy Football API\r\n\r\nUsing ESPN's Fantasy Football private API, this package interfaces with \r\nESPN Fantasy Football to gather data from any public league. A good way to mine data\r\nwithout webscraping for data manipulation projects.\r\n\r\n## Getting Started\r\n\r\nThese instructions will get you a copy of the project up and running \r\non your local machine for development and testing purposes.\r\n\r\n### Installing\r\nWith pip:\r\n\r\n```python3\r\npip3 install espnff\r\n```\r\n\r\nWith Git:\r\n\r\n```bash\r\ngit clone https://github.com/rbarton65/espnff\r\n\r\ncd espnff\r\n\r\npython3 setup.py install\r\n```\r\n\r\n\r\n## Basic Usage\r\n\r\nThis gives an overview of all the features of `espnff`\r\n\r\n### Downloading a public league\r\n\r\n```python3\r\n\u003e\u003e\u003e from espnff import League\r\n\u003e\u003e\u003e league_id = 123456\r\n\u003e\u003e\u003e year = 2016\r\n\u003e\u003e\u003e league = League(league_id, year)\r\n\u003e\u003e\u003e league\r\nLeague 123456, 2016 Season\r\n```\r\n\r\n### Viewing teams in a public league\r\n\r\n```python3\r\n\u003e\u003e\u003e from espnff import League\r\n\u003e\u003e\u003e league_id = 123456\r\n\u003e\u003e\u003e year = 2016\r\n\u003e\u003e\u003e league = League(league_id, year)\r\n\u003e\u003e\u003e league.teams\r\n[Team(Team 1), Team(Team 2), Team(Team 3), Team(Team 4),\r\nTeam(Team 5), Team(Team 6), Team(Team 7), Team(Team 8)]\r\n\u003e\u003e\u003e team1 = league.teams[0]\r\n\u003e\u003e\u003e team1\r\nTeam(Team 1)\r\n```\r\n\r\n### Viewing data for specific team\r\n\r\n```python3\r\n\u003e\u003e\u003e league.teams\r\n[Team(Team 1), Team(Team 2), Team(Team 3), Team(Team 4),\r\nTeam(Team 5), Team(Team 6), Team(Team 7), Team(Team 8)]\r\n\u003e\u003e\u003e team1 = league.teams[0]\r\n\u003e\u003e\u003e team1.team_id\r\n1\r\n\u003e\u003e\u003e team1.team_name\r\nTeam 1\r\n\u003e\u003e\u003e team1.team_abbrev\r\nT1\r\n\u003e\u003e\u003e team1.owner\r\nRoger Goodell\r\n\u003e\u003e\u003e team1.division_id\r\n0\r\n\u003e\u003e\u003e team1.division_name\r\nDivision 1\r\n\u003e\u003e\u003e team1.wins\r\n5\r\n\u003e\u003e\u003e team1.losses\r\n1\r\n\u003e\u003e\u003e team1.points_for\r\n734.69\r\n\u003e\u003e\u003e team1.points_against\r\n561.15\r\n\u003e\u003e\u003e team1.schedule\r\n[Team(Team 2), Team(Team 3), Team(Team 4), Team(Team 5), Team(Team 6), Team(Team 7), Team(Team 8),\r\nTeam(Team 2), Team(Team 3), Team(Team 4), Team(Team 5), Team(Team 6), Team(Team 7), Team(Team 8)\r\n\u003e\u003e\u003e team1.scores\r\n[135.5, 126.38, 129.53, 126.65, 114.81, 101.82, 1.15, 0, 0, 0, 0, 0, 0, 0]\r\n\u003e\u003e\u003e team1.mov\r\n[32.12, 24.92, 45.97, 34.17, 41.74, -5.39, 1.15, 0, 0, 0, 0, 0, 0, 0]\r\n```\r\n\r\n### Viewing league settings\r\n\r\n```python3\r\n\u003e\u003e\u003e from espnff import League\r\n\u003e\u003e\u003e league_id = 123456\r\n\u003e\u003e\u003e year = 2016\r\n\u003e\u003e\u003e league = League(league_id, year)\r\n\u003e\u003e\u003e settings = league.settings\r\n\u003e\u003e\u003e settings\r\n'Settings(League Name)'\r\n\u003e\u003e\u003e settings.reg_season_count\r\n14\r\n\u003e\u003e\u003e self.final_season_count\r\n16\r\n\u003e\u003e\u003e settings.undroppable_list\r\ntrue\r\n\u003e\u003e\u003e settings.veto_votes_required\r\n4\r\n\u003e\u003e\u003e settings.team_count\r\n8\r\n\u003e\u003e\u003e settings.playoff_team_count\r\n4\r\n\u003e\u003e\u003e settings.id\r\n123456\r\n\u003e\u003e\u003e settings.keeper_count\r\n3\r\n\u003e\u003e\u003e settings.tie_rule\r\n'Most Bench Points'\r\n\u003e\u003e\u003e settings.playoff_seed_tie_rule\r\n'Head to Head Record'\r\n\u003e\u003e\u003e settings.roster\r\n{'RB/WR/TE': 1, 'BE': 7, 'QB': 1, 'D/ST': 1, 'RB': 2, 'TE': 1, 'K': 1, 'WR': 2}\r\n\u003e\u003e\u003e settings.trade_deadline\r\n2016-11-16T17:00:00.000Z\r\n\u003e\u003e\u003e settings.name\r\nLeague Name\r\n\u003e\u003e\u003e settings.status\r\nplayoffs\r\n\u003e\u003e\u003e settings.year\r\n2016\r\n\u003e\u003e\u003e settings.server_date\r\n2016-12-08T21:06:53.087Z\r\n```\r\n\r\n### Viewing power rankings\r\n\r\n```python3\r\n\u003e\u003e\u003e from espnff import League\r\n\u003e\u003e\u003e league_id = 123456\r\n\u003e\u003e\u003e year = 2016\r\n\u003e\u003e\u003e league = League(league_id, year)\r\n\u003e\u003e\u003e league.power_rankings(week=5)\r\n[('31.85', Team(Team 1)), ('25.60', Team(Team 3)), ('25.60', Team(Team 6)), ('22.45', Team(Team 2)),\r\n('20.70', Team(Team 8)), ('18.20', Team(Team 7)), ('18.20', Team(Team 4)), ('18.10', Team(Team 5))]\r\n```\r\n\r\n### Viewing scoreboard\r\n\r\n```python3\r\n\u003e\u003e\u003e from espnff import League\r\n\u003e\u003e\u003e league_id = 123456\r\n\u003e\u003e\u003e year = 2016\r\n\u003e\u003e\u003e league = League(league_id, year)\r\n\u003e\u003e\u003e league.scoreboard() # grab current week\r\n[\"Matchup(Team(Team 2), Team(Team 7))\", \"Matchup(Team(Team 1), Team(Team 11))\",\r\n\"Matchup(Team(Team 6), Team(Team 9))\", \"Matchup(Team(Team 12), Team(Team 4))\",\r\n\"Matchup(Team(Team 10), Team(Team 3))\", \"Matchup(Team(Team 8), Team(Team 5))\"]\r\n\u003e\u003e\u003e scoreboard = league.scoreboard(week=12) # define week\r\n\u003e\u003e\u003e scoreboard\r\n[\"Matchup(Team(Team 2), Team(Team 7))\", \"Matchup(Team(Team 1), Team(Team 11))\",\r\n\"Matchup(Team(Team 6), Team(Team 9))\", \"Matchup(Team(Team 12), Team(Team 4))\",\r\n\"Matchup(Team(Team 10), Team(Team 3))\", \"Matchup(Team(Team 8), Team(Team 5))\"]\r\n\u003e\u003e\u003e matchup = scoreboard[1]\r\n\u003e\u003e\u003e matchup\r\n\"Matchup(Team(Team 1), Team(Team 11))\"\r\n\u003e\u003e\u003e matchup.home_team\r\n\"Team(Team 1)\"\r\n\u003e\u003e\u003e matchup.home_score\r\n7.05\r\n\u003e\u003e\u003e matchup.away_team\r\n\"Team(Team 11)\"\r\n\u003e\u003e\u003e matchup.away_score\r\n45.85\r\n```\r\n\r\n## Running the tests\r\n\r\nAutomated tests for this package are included in the `tests` directory. After installation,\r\nyou can run these tests by changing the directory to the `espnff` directory and running the following:\r\n\r\n```python3\r\npython3 setup.py test\r\n```\r\n\r\n## Versioning\r\n\r\nThis library uses [SemVer](http://semver.org/) for versioning. For available versions, see the\r\n[tags on this repository](https://github.com/rbarton65/espnff/tags)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbarton65%2Fespnff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbarton65%2Fespnff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbarton65%2Fespnff/lists"}