Skip to main content

codecov Join the chat at https://gitter.im/ff-espn-api/community PyPI version

ESPN API

This package uses ESPN's Fantasy API to extract data from any public or private league for Fantasy Football and Basketball (NHL, MLB, and WNBA are in development).
Please feel free to make suggestions, bug reports, and pull request for features or fixes!

This package was inspired and based off of rbarton65/espnff.

Installing

Note

For contributors, please refer to the development section.

Latest release with pip:

pip install espn_api

Clone from source with Git and uv:

git clone https://github.com/cwendt94/espn-api
cd espn-api
uv sync

Development

This project's development tooling uses uv as the dependency/environment manager, in order to create an easy, reproducible development workflow. With uv installed, run uv sync --extra dev at the root of your clone to setup the dev environment. The formatter needs Python 3.10+.

Tests

uv run pytest tests --ignore-glob='**/integration/**'

Omit the --ignore-glob option to run all tests(including those that hit live ESPN).

Format

uv run black espn_api tests

Type check

uv run mypy espn_api

Usage

For Getting Started and API details head over to the Wiki!

# Football API
from espn_api.football import League
# Basketball API
from espn_api.basketball import League
# Hockey API
from espn_api.hockey import League
# Baseball API
from espn_api.baseball import League
# Init
league = League(league_id=222, year=2019)

Discussions (new)

If you have any questions about the package, ESPN API data, or want to talk about a feature please start a discussion!

Issue Reporting

If you find a bug follow the steps below for reporting.

  1. Open a new issue with a brief description of the bug for the title. In the title also add which sport (Football or Basketball)

  2. Run the application in debug mode to view ESPN API request's and response's

    # ... import statement above
    league = League(league_id=1245, year=2019, debug=True)
    

    The application will print all requests and the response from ESPN's API in the console. I would suggest piping the console output to a text file as it will be a lot of data.

  3. Find the last log before the crash and copy it in the issue descrption with the line number of the crash or possible bug.

  4. Submit the new issue!

I will try to comment on the issue as soon as possible with my thoughts and possible fix!

Metadata

Release files for espn-api 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for espn-api 1.0.0
File Interpreter ABI Platform
espn_api-1.0.0-py3-none-any.whl Python 3 none any Details

Release files / espn_api-1.0.0-py3-none-any.whl

Download URL espn_api-1.0.0-py3-none-any.whl
Size 82.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3776e907583e48f1e6467c9a35f6c7d3d6d08e9d998e2c413d09a61727cb2a8c
BLAKE2b-256 checksum
How to use checksums
7f396be3f74165532820174fd7fafaffe54b9c3578598048b9bd84ae48a9651f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

1.0.1

1 release file

This release

1.0.0 This release

1 release file

0.46.0

1 release file

0.45.1

1 release file

0.45.0

1 release file

0.44.1

1 release file

0.44.0

1 release file

0.43.0

1 release file

0.42.0

1 release file

0.41.0

1 release file

0.40.1

1 release file

0.40.0

1 release file

0.39.0

1 release file

0.38.1

1 release file

0.38.0

1 release file

0.37.1

1 release file

0.37.0

1 release file

0.36.0

1 release file

0.35.0

1 release file

0.34.2

1 release file

0.34.1

1 release file

0.34.0

1 release file

0.33.0

1 release file

0.32.0

1 release file

0.31.0

1 release file

0.30.0

2 release files

0.29.2

2 release files

0.29.0

2 release files

0.28.1

2 release files

0.28.0

2 release files

0.27.0

2 release files

0.25.0

2 release files

0.23.0

2 release files

0.22.1

2 release files

0.22.0

2 release files

0.21.0

2 release files

0.20.1

2 release files

0.19.2

2 release files

0.19.0

2 release files

0.18.4

2 release files

0.18.1

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.15.1

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page