audl


Nameaudl JSON
Version 0.0.15 PyPI version JSON
download
home_pagehttps://github.com/yukikongju/audl
SummaryUnofficial audl api
upload_time2024-01-29 04:46:42
maintainer
docs_urlNone
authoryukikongju
requires_python>=3.7
licenseMIT
keywords audl audl.com ultimate frisbee
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AUDL API

Unofficial AUDL api for python users

What it does: 
- [X] Fetch Data directly from [audl website](https://theaudl.com)
- [ ] Update database from Web Scrapping using workflow
- [ ] Generate pdf reports for player, team and games

[See Documentation](https://htmlpreview.github.io/?https://github.com/yukikongju/audl/blob/master/docs/audl/index.html)

To download the package: `pip install audl`


## Usage


#### How to get player profile

```python
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](https://user-images.githubusercontent.com/34996954/172069063-9499e31a-aab3-4a58-9345-106555f41b7a.png)

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


```python
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](https://user-images.githubusercontent.com/34996954/172069041-48e55c45-717c-4e99-a7aa-777658833ac6.png)

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

```python
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](https://user-images.githubusercontent.com/34996954/178094543-d6c57f95-6f1f-4aae-a7a4-a6687ab46afb.png)


```python

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

```python

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](https://user-images.githubusercontent.com/34996954/178094574-43272b29-8d47-4d15-8207-0536dd2ca30c.png)


```python
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()

```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yukikongju/audl",
    "name": "audl",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "audl,audl.com,ultimate frisbee",
    "author": "yukikongju",
    "author_email": "yukikongju@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/51/83/f3ae8c5c9452498e8359b2df42dee458f2be4578df92bf0abffe16456d05/audl-0.0.15.tar.gz",
    "platform": null,
    "description": "# AUDL API\n\nUnofficial AUDL api for python users\n\nWhat it does: \n- [X] Fetch Data directly from [audl website](https://theaudl.com)\n- [ ] Update database from Web Scrapping using workflow\n- [ ] Generate pdf reports for player, team and games\n\n[See Documentation](https://htmlpreview.github.io/?https://github.com/yukikongju/audl/blob/master/docs/audl/index.html)\n\nTo download the package: `pip install audl`\n\n\n## Usage\n\n\n#### How to get player profile\n\n```python\nfrom audl.stats.endpoints.playerprofile import PlayerProfile\n\n# Fetching dataframe from \"https://theaudl.com/league/players/cbrock\"\nplayer = PlayerProfile('cbrock')\ncareer = player.get_career_stats()\nreg = player.get_regular_seasons_career()\nplayoffs = player.get_playoffs_career()\nseason = player.get_season_games_stats(2019)\ngames_stats = player.get_career_games_stats()\n```\n\n#### How to get Team Stats\n\n![image](https://user-images.githubusercontent.com/34996954/172069063-9499e31a-aab3-4a58-9345-106555f41b7a.png)\n\nSeason=['career', 2022, ..., 2012]\nPer=['total', 'game']\nTeam=['team', 'opponent']\n\n\n```python\nfrom audl.stats.endpoints.teamstats import TeamStats\n\n# fetching from \"https://theaudl.com/stats/team\"\nteam_stats = TeamStats('career', 'game', 'opponent') # TeamStats(season, per, team)\ndf = team_stats.get_table()\n```\n\n#### How to get Player Stats\n\n![image](https://user-images.githubusercontent.com/34996954/172069041-48e55c45-717c-4e99-a7aa-777658833ac6.png)\n\nSeason=['career', 2022, ..., 2012]\nPer=['total', 'game', 'points', 'possessions', 'minutes']\n\n```python\nfrom audl.stats.endpoints.playerstats import PlayerStats\n\n# from \"https://theaudl.com/stats/player-stats\"\nplayerstats = PlayerStats('career', 'total', 'breeze').fetch_table()  # PlayerStats(season, per, team)\n```\n\n#### How to fetch season schedule\n\n![image](https://user-images.githubusercontent.com/34996954/178094543-d6c57f95-6f1f-4aae-a7a4-a6687ab46afb.png)\n\n\n```python\n\nfrom audl.stats.endpoints.seasonschedule import SeasonSchedule, TeamSeasonSchedule, AllSchedule, TeamSeasonAgainstOpponentSchedule\n\n# Fetch complete season schedule from \"https://theaudl.com/league/game-search\"\n\nfrom audl.stats.endpoints.seasonschedule import SeasonSchedule, TeamSeasonSchedule, AllSchedule, TeamSeasonAgainstOpponentSchedule\n\n# Fetch complete season schedule from \"https://theaudl.com/league/game-search\"\n\nseason_schedule = SeasonSchedule(2022).get_schedule()\nteam_season_schedule = TeamSeasonSchedule(2022, 'royal').get_schedule()\nall_schedule = AllSchedule().get_schedule()\nteam_season_against_opponent = TeamSeasonAgainstOpponentSchedule(2022, 'royal', 'rush').get_schedule()\n\n```\n\n#### How to get game statistics\n\n```python\n\nfrom audl.stats.endpoints.gamestats import GameStats\n\n# Fetching Box Scores from \"https://theaudl.com/stats/game/2021-06-05-RAL-ATL\"\ngame = GameStats(\"2021-06-05-RAL-ATL\")\nteams = game.get_teams_metadata()\nplayers = game.get_players_metadata()\ngame_metadata = game.get_game_metadata()\nteam_stats = game.get_team_stats()\nroster = game.get_roster_stats()\nscoring_time = game._get_scoring_time()\nboxscores = game.get_boxscores()\nevents = game.get_events()\nthrow_selection = game.get_throw_selection()\nthrower_receiver_count = game.get_thrower_receiver_count(True)\nlineup = game.get_lineup_frequency(True)\nteamates = game.get_teamates_selection('ataylor', True)\ndf_throws = game.get_throws_dataframe()\n\n# print game events\ngame.print_team_events(True)\ngame.print_team_events(False)\n```\n\n#### How to get Team Game Stats\n\n![image](https://user-images.githubusercontent.com/34996954/178094574-43272b29-8d47-4d15-8207-0536dd2ca30c.png)\n\n\n```python\nfrom audl.stats.endpoints.teamgamestats import AllTeamGameStats, SeasonGameStats, TeamSeasonGameStats\n\nteam_season = TeamSeasonGameStats(2022, 'royal').get_game_stats()\nall_games = AllTeamGameStats().get_game_stats()\nseason_games = SeasonGameStats(2022).get_game_stats()\n\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Unofficial audl api",
    "version": "0.0.15",
    "project_urls": {
        "Homepage": "https://github.com/yukikongju/audl"
    },
    "split_keywords": [
        "audl",
        "audl.com",
        "ultimate frisbee"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5cc49e0d24fb8da13371245fff466dd2518d88d923982a040a2b27758db96671",
                "md5": "d806204796ccfe25201b748d9f534b51",
                "sha256": "899c78964aadb614aa7acf40a2690e7fd7f8b4a204a699bbcdb096780656c863"
            },
            "downloads": -1,
            "filename": "audl-0.0.15-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d806204796ccfe25201b748d9f534b51",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 27378,
            "upload_time": "2024-01-29T04:46:41",
            "upload_time_iso_8601": "2024-01-29T04:46:41.176613Z",
            "url": "https://files.pythonhosted.org/packages/5c/c4/9e0d24fb8da13371245fff466dd2518d88d923982a040a2b27758db96671/audl-0.0.15-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5183f3ae8c5c9452498e8359b2df42dee458f2be4578df92bf0abffe16456d05",
                "md5": "8b729c082870b3032b208304e65cf946",
                "sha256": "43b5837844d2a5d494888f8c90d7b07721f546d2a62df183d7b58442c421dce9"
            },
            "downloads": -1,
            "filename": "audl-0.0.15.tar.gz",
            "has_sig": false,
            "md5_digest": "8b729c082870b3032b208304e65cf946",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 21375,
            "upload_time": "2024-01-29T04:46:42",
            "upload_time_iso_8601": "2024-01-29T04:46:42.871467Z",
            "url": "https://files.pythonhosted.org/packages/51/83/f3ae8c5c9452498e8359b2df42dee458f2be4578df92bf0abffe16456d05/audl-0.0.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-29 04:46:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yukikongju",
    "github_project": "audl",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "audl"
}
        
Elapsed time: 0.53370s