All Projects → rbarton65 → Espnff

rbarton65 / Espnff

ESPN Fantasy Football API

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Espnff

Espn Api
ESPN Fantasy API! (Football, Basketball)
Stars: ✭ 155 (-26.19%)
Mutual labels:  api, football
World Cup.json
Free open public domain football data for the world cups in JSON incl. Russia 2018 and more - No API key required ;-)
Stars: ✭ 152 (-27.62%)
Mutual labels:  api, football
Soccerapi
soccerapi ⚽️ , an unambitious soccer odds scraper
Stars: ✭ 52 (-75.24%)
Mutual labels:  api, football
Espn Fantasy Football Api
Connect to ESPN's fantasy football API via this JS API client for web and NodeJS. Available as an npm package.
Stars: ✭ 188 (-10.48%)
Mutual labels:  api, football
Node Fb Messenger
✉️ Facebook Messenger Platform Node.js API Wrapper
Stars: ✭ 206 (-1.9%)
Mutual labels:  api
Fastapi Gino Arq Uvicorn
High-performance Async REST API, in Python. FastAPI + GINO + Arq + Uvicorn (w/ Redis and PostgreSQL).
Stars: ✭ 204 (-2.86%)
Mutual labels:  api
Lndhub
Wrapper for Lightning Network Daemon. It provides separate accounts and trust minimization for end users
Stars: ✭ 203 (-3.33%)
Mutual labels:  api
Dialetus Service
API to Informal dictionary for the idiomatic expressions that each Brazilian region It has
Stars: ✭ 202 (-3.81%)
Mutual labels:  api
Alfanous
Alfanous is an Arabic search engine API provides the simple and advanced search in Quran , more features and many interfaces...
Stars: ✭ 209 (-0.48%)
Mutual labels:  api
Crick
📊 Crick is a backend for the Watson time-tracker.
Stars: ✭ 207 (-1.43%)
Mutual labels:  api
Verb
Organize and send HTTP requests from Emacs
Stars: ✭ 205 (-2.38%)
Mutual labels:  api
Swiftdailyapi
A Swift API framework for ZhiHu's Daily News.
Stars: ✭ 204 (-2.86%)
Mutual labels:  api
Vkapiphp
[Abandoned] Library for work with API Vk.com
Stars: ✭ 206 (-1.9%)
Mutual labels:  api
Streamdecksharp
A simple .NET wrapper for Stream Deck
Stars: ✭ 203 (-3.33%)
Mutual labels:  api
Drago
A flexible configuration manager for Wireguard networks
Stars: ✭ 204 (-2.86%)
Mutual labels:  api
Sport.db
sport.db - open sports database (e.g. football.db, formula1.db etc.) command line tool and libraries
Stars: ✭ 202 (-3.81%)
Mutual labels:  football
Openapi Directory
🌐 Wikipedia for Web APIs. Directory of REST API definitions in OpenAPI 2.0/3.x format
Stars: ✭ 2,635 (+1154.76%)
Mutual labels:  api
Chatapi Wechat
Java版本微信聊天接口,使用网页微信API,让你能够开发自己的微信聊天机器人
Stars: ✭ 207 (-1.43%)
Mutual labels:  api
Camerafragment
A simple easy-to-integrate Camera Fragment for Android
Stars: ✭ 2,312 (+1000.95%)
Mutual labels:  api
Api Development Tools
📚 A collection of useful resources for building RESTful HTTP+JSON APIs.
Stars: ✭ 2,519 (+1099.52%)
Mutual labels:  api

Build Status version PyPI version

ESPN Fantasy Football API

Using ESPN's Fantasy Football private API, this package interfaces with ESPN Fantasy Football to gather data from any public league. A good way to mine data without webscraping for data manipulation projects.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

With pip:

pip3 install espnff

With Git:

git clone https://github.com/rbarton65/espnff

cd espnff

python3 setup.py install

Basic Usage

This gives an overview of all the features of espnff

Downloading a public league

>>> from espnff import League
>>> league_id = 123456
>>> year = 2016
>>> league = League(league_id, year)
>>> league
League 123456, 2016 Season

Viewing teams in a public league

>>> from espnff import League
>>> league_id = 123456
>>> year = 2016
>>> league = League(league_id, year)
>>> league.teams
[Team(Team 1), Team(Team 2), Team(Team 3), Team(Team 4),
Team(Team 5), Team(Team 6), Team(Team 7), Team(Team 8)]
>>> team1 = league.teams[0]
>>> team1
Team(Team 1)

Viewing data for specific team

>>> league.teams
[Team(Team 1), Team(Team 2), Team(Team 3), Team(Team 4),
Team(Team 5), Team(Team 6), Team(Team 7), Team(Team 8)]
>>> team1 = league.teams[0]
>>> team1.team_id
1
>>> team1.team_name
Team 1
>>> team1.team_abbrev
T1
>>> team1.owner
Roger Goodell
>>> team1.division_id
0
>>> team1.division_name
Division 1
>>> team1.wins
5
>>> team1.losses
1
>>> team1.points_for
734.69
>>> team1.points_against
561.15
>>> team1.schedule
[Team(Team 2), Team(Team 3), Team(Team 4), Team(Team 5), Team(Team 6), Team(Team 7), Team(Team 8),
Team(Team 2), Team(Team 3), Team(Team 4), Team(Team 5), Team(Team 6), Team(Team 7), Team(Team 8)
>>> team1.scores
[135.5, 126.38, 129.53, 126.65, 114.81, 101.82, 1.15, 0, 0, 0, 0, 0, 0, 0]
>>> team1.mov
[32.12, 24.92, 45.97, 34.17, 41.74, -5.39, 1.15, 0, 0, 0, 0, 0, 0, 0]

Viewing league settings

>>> from espnff import League
>>> league_id = 123456
>>> year = 2016
>>> league = League(league_id, year)
>>> settings = league.settings
>>> settings
'Settings(League Name)'
>>> settings.reg_season_count
14
>>> self.final_season_count
16
>>> settings.undroppable_list
true
>>> settings.veto_votes_required
4
>>> settings.team_count
8
>>> settings.playoff_team_count
4
>>> settings.id
123456
>>> settings.keeper_count
3
>>> settings.tie_rule
'Most Bench Points'
>>> settings.playoff_seed_tie_rule
'Head to Head Record'
>>> settings.roster
{'RB/WR/TE': 1, 'BE': 7, 'QB': 1, 'D/ST': 1, 'RB': 2, 'TE': 1, 'K': 1, 'WR': 2}
>>> settings.trade_deadline
2016-11-16T17:00:00.000Z
>>> settings.name
League Name
>>> settings.status
playoffs
>>> settings.year
2016
>>> settings.server_date
2016-12-08T21:06:53.087Z

Viewing power rankings

>>> from espnff import League
>>> league_id = 123456
>>> year = 2016
>>> league = League(league_id, year)
>>> league.power_rankings(week=5)
[('31.85', Team(Team 1)), ('25.60', Team(Team 3)), ('25.60', Team(Team 6)), ('22.45', Team(Team 2)),
('20.70', Team(Team 8)), ('18.20', Team(Team 7)), ('18.20', Team(Team 4)), ('18.10', Team(Team 5))]

Viewing scoreboard

>>> from espnff import League
>>> league_id = 123456
>>> year = 2016
>>> league = League(league_id, year)
>>> league.scoreboard() # grab current week
["Matchup(Team(Team 2), Team(Team 7))", "Matchup(Team(Team 1), Team(Team 11))",
"Matchup(Team(Team 6), Team(Team 9))", "Matchup(Team(Team 12), Team(Team 4))",
"Matchup(Team(Team 10), Team(Team 3))", "Matchup(Team(Team 8), Team(Team 5))"]
>>> scoreboard = league.scoreboard(week=12) # define week
>>> scoreboard
["Matchup(Team(Team 2), Team(Team 7))", "Matchup(Team(Team 1), Team(Team 11))",
"Matchup(Team(Team 6), Team(Team 9))", "Matchup(Team(Team 12), Team(Team 4))",
"Matchup(Team(Team 10), Team(Team 3))", "Matchup(Team(Team 8), Team(Team 5))"]
>>> matchup = scoreboard[1]
>>> matchup
"Matchup(Team(Team 1), Team(Team 11))"
>>> matchup.home_team
"Team(Team 1)"
>>> matchup.home_score
7.05
>>> matchup.away_team
"Team(Team 11)"
>>> matchup.away_score
45.85

Running the tests

Automated tests for this package are included in the tests directory. After installation, you can run these tests by changing the directory to the espnff directory and running the following:

python3 setup.py test

Versioning

This library uses SemVer for versioning. For available versions, see the tags on this repository

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].