Skip to content

Repository files navigation

cfbd

Build college football applications, models, and analysis with game, team, player, recruiting, ranking, and advanced metrics data. Request an API key at CollegeFootballData.com.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 5.24.0
  • Package version: 5.24.0
  • Generator version: 7.12.0
  • Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen For more information, please visit https://collegefootballdata.com

Requirements.

Python 3.7+

Installation & Usage

pip install

pip install cfbd

(you may need to run pip with root permission: sudo pip install cfbd)

Then import the package:

importcfbd

Getting Started

Please follow the installation procedure and then run the following:

importtimeimportcfbdfromcfbd.restimportApiExceptionfrompprintimportpprint# Defining the host is optional and defaults to https://api.collegefootballdata.com# See configuration.py for a list of all supported configuration parameters.configuration=cfbd.Configuration(
host="https://api.collegefootballdata.com"
)
# The client must configure the authentication and authorization parameters# in accordance with the API server security policy.# Examples for each auth method are provided below, use the example that# satisfies your auth use case.# Configure Bearer authorization: apiKeyconfiguration=cfbd.Configuration(
access_token=os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API clientwithcfbd.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=cfbd.AdjustedMetricsApi(api_client)
year=56# int | Season year. (optional)team='team_example'# str | Team name. (optional)conference='conference_example'# str | Conference abbreviation. (optional)position='position_example'# str | Player position abbreviation. (optional)try:
api_response=api_instance.get_adjusted_player_passing_stats(year=year, team=team, conference=conference, position=position)
print("The response of AdjustedMetricsApi->get_adjusted_player_passing_stats:\n")
pprint(api_response)
exceptApiExceptionase:
print("Exception when calling AdjustedMetricsApi->get_adjusted_player_passing_stats: %s\n"%e)

Documentation for API Endpoints

All URIs are relative to https://api.collegefootballdata.com

ClassMethodHTTP requestDescription
AdjustedMetricsApiget_adjusted_player_passing_statsGET /wepa/players/passing
AdjustedMetricsApiget_adjusted_player_rushing_statsGET /wepa/players/rushing
AdjustedMetricsApiget_adjusted_team_season_statsGET /wepa/team/season
AdjustedMetricsApiget_kicker_paarGET /wepa/players/kicking
BettingApiget_linesGET /lines
CoachesApiget_coach_profileGET /coaches/profile
CoachesApiget_coach_seasonsGET /coaches/seasons
CoachesApiget_coach_tenuresGET /coaches/tenures
CoachesApiget_coachesGET /coaches
ConferencesApiget_conferencesGET /conferences
ConferencesApiget_team_conference_affiliationsGET /conferences/affiliations
ConferencesApiget_team_conference_changesGET /conferences/changes
DraftApiget_draft_picksGET /draft/picks
DraftApiget_draft_positionsGET /draft/positions
DraftApiget_draft_teamsGET /draft/teams
DrivesApiget_drivesGET /drives
GamesApiget_advanced_box_scoreGET /game/box/advanced
GamesApiget_calendarGET /calendar
GamesApiget_game_player_statsGET /games/players
GamesApiget_game_team_statsGET /games/teams
GamesApiget_gamesGET /games
GamesApiget_mediaGET /games/media
GamesApiget_recordsGET /records
GamesApiget_scoreboardGET /scoreboard
GamesApiget_weatherGET /games/weather
InfoApiget_usageGET /info/usage
InfoApiget_user_infoGET /info
MetricsApiget_field_goal_expected_pointsGET /metrics/fg/ep
MetricsApiget_predicted_pointsGET /ppa/predicted
MetricsApiget_predicted_points_added_by_gameGET /ppa/games
MetricsApiget_predicted_points_added_by_player_gameGET /ppa/players/games
MetricsApiget_predicted_points_added_by_player_seasonGET /ppa/players/season
MetricsApiget_predicted_points_added_by_teamGET /ppa/teams
MetricsApiget_pregame_win_probabilitiesGET /metrics/wp/pregame
MetricsApiget_win_probabilityGET /metrics/wp
PlayersApiget_player_season_overviewGET /player/season/overview
PlayersApiget_player_usageGET /player/usage
PlayersApiget_returning_productionGET /player/returning
PlayersApiget_transfer_portalGET /player/portal
PlayersApisearch_playersGET /player/search
PlayoffsApiget_cfp_gamesGET /playoffs/cfp/games
PlayoffsApiget_cfp_participantsGET /playoffs/cfp/participants
PlayoffsApiget_cfp_playoffGET /playoffs/cfp
PlaysApiget_live_playsGET /live/plays
PlaysApiget_play_stat_typesGET /plays/stats/types
PlaysApiget_play_statsGET /plays/stats
PlaysApiget_play_typesGET /plays/types
PlaysApiget_playsGET /plays
RankingsApiget_rankingsGET /rankings
RatingsApiget_conference_spGET /ratings/sp/conferences
RatingsApiget_coreGET /ratings/core
RatingsApiget_eloGET /ratings/elo
RatingsApiget_expanded_srsGET /ratings/srs/expanded
RatingsApiget_fpiGET /ratings/fpi
RatingsApiget_spGET /ratings/sp
RatingsApiget_srsGET /ratings/srs
RecruitingApiget_aggregated_team_recruiting_ratingsGET /recruiting/groups
RecruitingApiget_recruitsGET /recruiting/players
RecruitingApiget_team_recruiting_rankingsGET /recruiting/teams
StatsApiget_advanced_game_statsGET /stats/game/advanced
StatsApiget_advanced_season_statsGET /stats/season/advanced
StatsApiget_categoriesGET /stats/categories
StatsApiget_game_havoc_statsGET /stats/game/havoc
StatsApiget_player_game_success_ratesGET /stats/player/success/game
StatsApiget_player_season_statsGET /stats/player/season
StatsApiget_player_season_success_ratesGET /stats/player/success
StatsApiget_team_statsGET /stats/season
TeamsApiget_fbs_teamsGET /teams/fbs
TeamsApiget_matchupGET /teams/matchup
TeamsApiget_rosterGET /roster
TeamsApiget_talentGET /talent
TeamsApiget_teamsGET /teams
TeamsApiget_teams_atsGET /teams/ats
VenuesApiget_venuesGET /venues

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

apiKey

  • Type: Bearer authentication

Author

admin@collegefootballdata.com

Releases

Packages

Used by

Contributors

Languages