Profile
Back to NewsBack
GitHub Trending 8 min
Reader Mode
CFBD/cfbd-python: Python wrapper for the CFBD API

CFBD/cfbd-python: Python wrapper for the CFBD API

14 hours ago

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.32.0
  • Package version: 5.32.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:

import cfbd

Getting Started

Please follow the installation procedure and then run the following:

import time
import cfbd
from cfbd.rest import ApiException
from pprint import pprint

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: apiKey

configuration = cfbd.Configuration( access_token = os.environ["BEARER_TOKEN"] )

Enter a context with an instance of the API client

with cfbd.ApiClient(configuration) as api_client: # Create an instance of the API class api_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) except ApiException as e: 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

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- AdjustedMetricsApi | get_adjusted_player_passing_stats | GET /wepa/players/passing | AdjustedMetricsApi | get_adjusted_player_rushing_stats | GET /wepa/players/rushing | AdjustedMetricsApi | get_adjusted_team_season_stats | GET /wepa/team/season | AdjustedMetricsApi | get_kicker_paar | GET /wepa/players/kicking | BettingApi | get_lines | GET /lines | CoachesApi | get_coach_profile | GET /coaches/profile | CoachesApi | get_coach_seasons | GET /coaches/seasons | CoachesApi | get_coach_tenures | GET /coaches/tenures | CoachesApi | get_coaches | GET /coaches | ConferencesApi | get_conferences | GET /conferences | ConferencesApi | get_team_conference_affiliations | GET /conferences/affiliations | ConferencesApi | get_team_conference_changes | GET /conferences/changes | DraftApi | get_draft_picks | GET /draft/picks | DraftApi | get_draft_positions | GET /draft/positions | DraftApi | get_draft_teams | GET /draft/teams | DrivesApi | get_drives | GET /drives | GamesApi | get_adjusted_game_preview | GET /games/{gameId}/preview/adjusted | GamesApi | get_advanced_box_score | GET /game/box/advanced | GamesApi | get_calendar | GET /calendar | GamesApi | get_game_player_stats | GET /games/players | GamesApi | get_game_preview | GET /games/{gameId}/preview | GamesApi | get_game_schedule | GET /games/schedule | GamesApi | get_game_team_stats | GET /games/teams | GamesApi | get_games | GET /games | GamesApi | get_media | GET /games/media | GamesApi | get_records | GET /records | GamesApi | get_scoreboard | GET /scoreboard | GamesApi | get_weather | GET /games/weather | InfoApi | get_usage | GET /info/usage | InfoApi | get_user_info | GET /info | MetricsApi | get_field_goal_expected_points | GET /metrics/fg/ep | MetricsApi | get_predicted_points | GET /ppa/predicted | MetricsApi | get_predicted_points_added_by_game | GET /ppa/games | MetricsApi | get_predicted_points_added_by_player_game | GET /ppa/players/games | MetricsApi | get_predicted_points_added_by_player_season | GET /ppa/players/season | MetricsApi | get_predicted_points_added_by_team | GET /ppa/teams | MetricsApi | get_pregame_win_probabilities | GET /metrics/wp/pregame | MetricsApi | get_win_probability | GET /metrics/wp | PassingApi | get_passing_plays | GET /passing/plays | PassingApi | get_player_passing_by_game | GET /passing/players/games | PassingApi | get_player_passing_by_season | GET /passing/players/season | PassingApi | get_team_passing_by_game | GET /passing/teams/games | PassingApi | get_team_passing_by_season | GET /passing/teams/season | PlayersApi | get_player_season_overview | GET /player/season/overview | PlayersApi | get_player_usage | GET /player/usage | PlayersApi | get_returning_production | GET /player/returning | PlayersApi | get_transfer_portal | GET /player/portal | PlayersApi | search_players | GET /player/search | PlayoffsApi | get_cfp_games | GET /playoffs/cfp/games | PlayoffsApi | get_cfp_participants | GET /playoffs/cfp/participants | PlayoffsApi | get_cfp_playoff | GET /playoffs/cfp | PlaysApi | get_live_plays | GET /live/plays | PlaysApi | get_play_stat_types | GET /plays/stats/types | PlaysApi | get_play_stats | GET /plays/stats | PlaysApi | get_play_types | GET /plays/types | PlaysApi | get_plays | GET /plays | RankingsApi | get_rankings | GET /rankings | RatingsApi | get_conference_sp | GET /ratings/sp/conferences | RatingsApi | get_core | GET /ratings/core | RatingsApi | get_elo | GET /ratings/elo | RatingsApi | get_expanded_srs | GET /ratings/srs/expanded | RatingsApi | get_fpi | GET /ratings/fpi | RatingsApi | get_sp | GET /ratings/sp | RatingsApi | get_srs | GET /ratings/srs | RecruitingApi | get_aggregated_team_recruiting_ratings | GET /recruiting/groups | RecruitingApi | get_recruits | GET /recruiting/players | RecruitingApi | get_team_recruiting_rankings | GET /recruiting/teams | RushingApi | get_player_rushing_by_game | GET /rushing/players/games | RushingApi | get_player_rushing_by_season | GET /rushing/players/season | RushingApi | get_rushing_plays | GET /rushing/plays | RushingApi | get_team_rushing_by_game | GET /rushing/teams/games | RushingApi | get_team_rushing_by_season | GET /rushing/teams/season | StatsApi | get_advanced_game_stats | GET /stats/game/advanced | StatsApi | get_advanced_season_stats | GET /stats/season/advanced | StatsApi | get_categories | GET /stats/categories | StatsApi | get_game_havoc_stats | GET /stats/game/havoc | StatsApi | get_player_game_success_rates | GET /stats/player/success/game | StatsApi | get_player_season_stats | GET /stats/player/season | StatsApi | get_player_season_success_rates | GET /stats/player/success | StatsApi | get_team_stats | GET /stats/season | TeamsApi | get_fbs_teams | GET /teams/fbs | TeamsApi | get_matchup | GET /teams/matchup | TeamsApi | get_roster | GET /roster | TeamsApi | get_talent | GET /talent | TeamsApi | get_team_season_overview | GET /teams/season/overview | TeamsApi | get_teams | GET /teams | TeamsApi | get_teams_ats | GET /teams/ats | VenuesApi | get_venues | GET /venues |

Documentation For Models

- AdjustedGamePreview - AdjustedPreviewAnalysis - AdjustedPreviewTeam - AdjustedTeamMetrics - AdjustedTeamMetricsEpa - AdjustedTeamMetricsRushing - AdjustedTeamMetricsSuccessRate - AdvancedBoxScore - AdvancedBoxScoreGameInfo - AdvancedBoxScorePlayers - AdvancedBoxScoreTeams - AdvancedGameStat - AdvancedGameStatDefense - AdvancedGameStatOffense - AdvancedGameStatOffensePassingDowns - AdvancedGameStatOffensePassingPlays - AdvancedSeasonStat - AdvancedSeasonStatDefense - AdvancedSeasonStatOffense - AggregatedTeamRecruiting - BettingGame - CalendarWeek - CfpCoachSeasonOutcome - CfpPlayoff - CfpPlayoffNotFound - Coach - CoachAlmaMater - CoachCareer - CoachCfpContext - CoachDraftContext - CoachNotFound - CoachPollResume - CoachProfile - CoachRatingContext - CoachRatingContextYearOverYear - CoachRecord - CoachRecordSplits - CoachRecruitingContext - CoachReference - CoachScoring - CoachSeason - CoachSeasonTeamReference - CoachTeamReference - CoachTenure - Conference - ConferenceClassification - ConferenceSP - ConferenceSPDefense - ConferenceSPOffense - CoreRatingSeasonType - DetailedCoachSeason - Division - DivisionClassification - DraftPick - DraftPickHometownInfo - DraftPosition - DraftTeam - Drive - ExpandedTeamSRS - FieldErrorsValue - FieldGoalEP - FreePreviewAnalysis - FreePreviewTeam - Game - GameHavocStats - GameHavocStatsOffense - GameLine - GameMedia - GamePlayerStatCategories - GamePlayerStatPlayer - GamePlayerStatTypes - GamePlayerStats - GamePlayerStatsTeam - GamePlayoff - GamePreview - GamePreviewError - GamePreviewMetadata - GameSchedule - GameScheduleFilters - GameStatus - GameTeamStats - GameTeamStatsTeam - GameTeamStatsTeamStat - GameWeather - GetCoachTenures400Response - GetTeamSeasonOverview400Response - KickerPAAR - LiveGame - LiveGameDrive - LiveGamePlay - LiveGameTeam - Matchup - MatchupGame - MediaType - PassDepth - PassDirection - PassLocation - PassOutcome - PassParseStatus - PassingLocationProduction - PassingLocations - PassingPlay - PassingPlayClock - PassingProduction - PickKickerPAARExcludeKeyofKickerPAARAttempts - PickPlayerWeightedEPAExcludeKeyofPlayerWeightedEPAPlays - Play - PlayClock - PlayStat - PlayStatClock - PlayStatType - PlayType - PlayWinProbability - PlayerGamePredictedPointsAdded - PlayerGamePredictedPointsAddedAveragePPA - PlayerGameSuccessRate - PlayerGameUsage - PlayerPPA - PlayerPPAChartItem - PlayerPassingGame - PlayerPassingSeason - PlayerRushingGame - PlayerRushingSeason - PlayerSearchResult - PlayerSearchTeamStint - PlayerSeasonOverview - PlayerSeasonOverviewBoxScoreStats - PlayerSeasonOverviewCategory - PlayerSeasonOverviewPPA - PlayerSeasonOverviewPPAAverage - PlayerSeasonOverviewStat - PlayerSeasonPredictedPointsAdded - PlayerSeasonSuccessRate - PlayerSourceAvailability - PlayerStat - PlayerStatsByQuarter - PlayerSuccessRateSplit - PlayerTransfer - PlayerUsage - PlayerWeightedEPA - PlayoffAdvancement - PlayoffBidType - PlayoffCompetition - PlayoffCompetitionCfp - PlayoffLinkedGame - PlayoffMatchup - PlayoffMatchupSlot - PlayoffMatchupSlotSource - PlayoffOutcome - PlayoffParticipant - PlayoffRound - PlayoffRoundRecord - PlayoffStatus - PlayoffTeam - Poll - PollRank - PollWeek - PredictedPointsValue - PregameWinProbability - PreviewAdjustedTeamMetrics - PreviewBroadcast - PreviewKeyPlayer - PreviewKeyPlayers - PreviewKickerPaar - PreviewPlayerWepa - PreviewReason - PreviewSectionPreviewAdjustedTeamMetrics - PreviewSectionPreviewBroadcastArray - PreviewSectionPreviewKeyPlayerArray - PreviewSectionPreviewKickerPaarArray - PreviewSectionPreviewPlayerWepaArray - PreviewSectionPreviewTeamStatistics - PreviewSectionRecentResultArray - PreviewSectionSelectedOdds - PreviewSectionSeriesHistory - PreviewSectionTeamSeasonOverviewAtRatings - PreviewSectionTeamSeasonOverviewAtRatingsData - PreviewSectionTeamSeasonOverviewAtRecord - PreviewSectionTeamSeasonOverviewAtRecordData - PreviewTeamIdentity - PreviewTeamStatistics - PreviewVenue - RankingPoll - RecentResult - RecentResultOpponent - RecordStatMetricKeyTeamStatRankOrNull - Recruit - RecruitClassification - RecruitHometownInfo - ReturningProduction - RosterPlayer - RushAttributionStatus - RushDirection - RushParseStatus - RushingDirectionProduction - RushingPlay - RushingPlayClock - ScheduleGame - ScheduleGameSeasonType - ScheduleWindow - ScoreboardGame - ScoreboardGameBetting - ScoreboardGameHomeTeam - ScoreboardGameVenue - ScoreboardGameWeather - SeasonType - SeasonTypeDB - SelectedOdds - SeriesHistory - SeriesHistoryStreak - SeriesMeeting - StatsByQuarter - Team - TeamATS - TeamConferenceAffiliation - TeamConferenceChange - TeamCoreRating - TeamElo - TeamExplosiveness - TeamFPI - TeamFPIEfficiencies - TeamFPIResumeRanks - TeamFieldPosition - TeamGamePredictedPointsAdded - TeamGamePredictedPointsAddedOffense - TeamHavoc - TeamPPA - TeamPassingGame - TeamPassingSeason - TeamRecord - TeamRecords - TeamRecruitingRanking - TeamRushingGame - TeamRushingProduction - TeamRushingProductionDirections - TeamRushingSeason - TeamRushingStats - TeamSP - TeamSPDefense - TeamSPOffense - TeamSPSpecialTeams - TeamSRS - TeamScoringOpportunities - TeamSeasonAdvancedStats - TeamSeasonAdvancedStatsDefense - TeamSeasonAdvancedStatsOffense - TeamSeasonAdvancedStatsOffenseFieldPosition - TeamSeasonAdvancedStatsOffenseHavoc - TeamSeasonAdvancedStatsOffensePassingDowns - TeamSeasonAdvancedStatsOffensePassingPlays - TeamSeasonOverview - TeamSeasonOverviewError - TeamSeasonOverviewPlayers - TeamSeasonOverviewRatings - TeamSeasonOverviewRatingsCore - TeamSeasonOverviewRatingsFpi - TeamSeasonOverviewRatingsSp - TeamSeasonOverviewRecord - TeamSeasonPlayerPpa - TeamSeasonPlayerPpaValues - TeamSeasonPlayerUsage - TeamSeasonPlayerUsageUsage - TeamSeasonPredictedPointsAdded - TeamSeasonPredictedPointsAddedOffense - TeamSeasonRankedRating - TeamSeasonStatRankings - TeamStat - TeamStatRank - TeamStatStatValue - TeamSuccessRates - TeamTalent - TransferEligibility - UserFeatureAccess - UserInfo - UserUsage - UserUsageApi - UserUsageEndpoint - UserUsageRecentRequest - UserUsageTotals - UserUsageWindow - Venue

Documentation For Authorization

Authentication schemes defined for the API:

apiKey

  • Type: Bearer authentication

Author

[email protected]

Chat with me