Skip to main content

Unofficial audl api

Project description

AUDL API

Unofficial AUDL api for python users

What it does:

  • Fetch Data directly from audl website
  • Update database from Web Scrapping using workflow
  • Generate pdf reports for player, team and games

See Documentation

To download the package: pip install audl

Usage

How to get player profile

from audl.stats.endpoints.playerprofile import PlayerProfile

# Fetching dataframe from "https://theaudl.com/league/players/cbrock"
player = PlayerProfile('cbrock')
career = player.get_career_stats()
reg = player.get_regular_seasons_career()
playoffs = player.get_playoffs_career()
season = player.get_season_games_stats(2019)
games_stats = player.get_career_games_stats()

How to get Team Stats

image

Season=['career', 2022, ..., 2012] Per=['total', 'game'] Team=['team', 'opponent']

from audl.stats.endpoints.teamstats import TeamStats

# fetching from "https://theaudl.com/stats/team"
team_stats = TeamStats('career', 'game', 'opponent') # TeamStats(season, per, team)
df = team_stats.get_table()

How to get Player Stats

image

Season=['career', 2022, ..., 2012] Per=['total', 'game', 'points', 'possessions', 'minutes']

from audl.stats.endpoints.playerstats import PlayerStats

# from "https://theaudl.com/stats/player-stats"
playerstats = PlayerStats('career', 'total', 'breeze').fetch_table()  # PlayerStats(season, per, team)

How to fetch season schedule

image

from audl.stats.endpoints.seasonschedule import SeasonSchedule, TeamSeasonSchedule, AllSchedule, TeamSeasonAgainstOpponentSchedule

# Fetch complete season schedule from "https://theaudl.com/league/game-search"

from audl.stats.endpoints.seasonschedule import SeasonSchedule, TeamSeasonSchedule, AllSchedule, TeamSeasonAgainstOpponentSchedule

# Fetch complete season schedule from "https://theaudl.com/league/game-search"

season_schedule = SeasonSchedule(2022).get_schedule()
team_season_schedule = TeamSeasonSchedule(2022, 'royal').get_schedule()
all_schedule = AllSchedule().get_schedule()
team_season_against_opponent = TeamSeasonAgainstOpponentSchedule(2022, 'royal', 'rush').get_schedule()

How to get game statistics

from audl.stats.endpoints.gamestats import GameStats

# Fetching Box Scores from "https://theaudl.com/stats/game/2021-06-05-RAL-ATL"
game = GameStats("2021-06-05-RAL-ATL")
teams = game.get_teams_metadata()
players = game.get_players_metadata()
game_metadata = game.get_game_metadata()
team_stats = game.get_team_stats()
roster = game.get_roster_stats()
scoring_time = game._get_scoring_time()
boxscores = game.get_boxscores()
events = game.get_events()
throw_selection = game.get_throw_selection()
thrower_receiver_count = game.get_thrower_receiver_count(True)
lineup = game.get_lineup_frequency(True)
teamates = game.get_teamates_selection('ataylor', True)
df_throws = game.get_throws_dataframe()

# print game events
game.print_team_events(True)
game.print_team_events(False)

How to get Team Game Stats

image

from audl.stats.endpoints.teamgamestats import AllTeamGameStats, SeasonGameStats, TeamSeasonGameStats

team_season = TeamSeasonGameStats(2022, 'royal').get_game_stats()
all_games = AllTeamGameStats().get_game_stats()
season_games = SeasonGameStats(2022).get_game_stats()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

audl-0.0.15.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

audl-0.0.15-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file audl-0.0.15.tar.gz.

File metadata

  • Download URL: audl-0.0.15.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for audl-0.0.15.tar.gz
Algorithm Hash digest
SHA256 43b5837844d2a5d494888f8c90d7b07721f546d2a62df183d7b58442c421dce9
MD5 8b729c082870b3032b208304e65cf946
BLAKE2b-256 5183f3ae8c5c9452498e8359b2df42dee458f2be4578df92bf0abffe16456d05

See more details on using hashes here.

File details

Details for the file audl-0.0.15-py3-none-any.whl.

File metadata

  • Download URL: audl-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for audl-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 899c78964aadb614aa7acf40a2690e7fd7f8b4a204a699bbcdb096780656c863
MD5 d806204796ccfe25201b748d9f534b51
BLAKE2b-256 5cc49e0d24fb8da13371245fff466dd2518d88d923982a040a2b27758db96671

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page