Skip to main content

An API Client package to access the APIs for NBA.com

Project description

PyPI CircleCI (all branches) GitHub

nba_api

An API Client package to access the APIs for NBA.com

Development Version: v1.1.5

nba_api is an API Client for www.nba.com. This package is meant to make the API Endpoints more accessible and to provide extensive documentation.

The APIs on www.nba.com are largely undocumented and change frequently.

Please feel free to contribute and have an open discussion regarding improvements and additional APIs to be mapped.

Recent Changes

  • Adding individual proxy, headers, and timeout support for requests. Usage

Mapped API Clients

  1. stats.nba.com - stats

Use

Installation

pip install nba_api

Required and Optional Packages:

Usage Examples

  • Basic Usage -- The basics of calling an API endpoint.
  • Jupyter Notebooks -- Larger practical examples in Jupyter Notebook format, including looking for play-by-play data for a particular game.

Documentation

Contributing and Development

Development

To get started developing, clone the repo and cd into it. Then, in an environment (conda or virtualenv) where you have not yet installed nba_api, run

python -m pip install -e .

This command will install the package for development, such that any changes you make in the repo will be reflected the next time you import the package in Python.

Testing

If you make a change to the package, it's important to verify everything still works. Do so by first installing the package for development, with the -e flag (see Development above), and then running

pytest

on the command line from the base directory of the repo. The pytest utility will run through all the package tests and print output throughout, informing you of any failures.

Contributing

We're always looking for people to help! Some examples of ways to get involved are:

  • fix a bug
  • add a feature
  • create or improve documentation and examples

Just fork this repo, make your changes (see Development above), and issue a pull request.

Other

Endpoint Analysis

A major purpose of this package is to map and analyze as many endpoints on NBA.com as possible. The documentation and analysis on the Endpoints and Parameters found in this package is some of the most extensive information available on these largely undocumented Endpoints. Please open an issue with any additional Endpoints/APIs.

Examples for Other Clients

Endpoint Analysis JSON for use with other clients

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

nba_api-1.1.5.tar.gz (110.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nba_api-1.1.5-py3-none-any.whl (215.8 kB view details)

Uploaded Python 3

File details

Details for the file nba_api-1.1.5.tar.gz.

File metadata

  • Download URL: nba_api-1.1.5.tar.gz
  • Upload date:
  • Size: 110.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.0

File hashes

Hashes for nba_api-1.1.5.tar.gz
Algorithm Hash digest
SHA256 7dd82c3fc5caa157697324cd98aab236eb8dc0f8a9a1b7e997462f3582237736
MD5 1e7ef76c73781feb84092539c5879f6c
BLAKE2b-256 8c6f5b3619ec39d7c326318e8c609c0482ef760bc52bcece4bc50bb6de0486c7

See more details on using hashes here.

File details

Details for the file nba_api-1.1.5-py3-none-any.whl.

File metadata

  • Download URL: nba_api-1.1.5-py3-none-any.whl
  • Upload date:
  • Size: 215.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.0

File hashes

Hashes for nba_api-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 45702ca7d5b4a0cdc3a037558f61d7b2457477e595f6aa726d390ef255daed9e
MD5 1a7a87e87155a038556db3b1aae9da87
BLAKE2b-256 98bcf701f6f7c79354419107e2534d22ed27bac7de9a6c2d85ab73f87bc140a9

See more details on using hashes here.

Supported by

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