Skip to main content

A lightweight (5 KB) Python client to retrieve NBA data from stats.nba.com

Project description

dlo

A lightweight (5 KB) Python client to retrieve NBA data from stats.nba.com.

Installation

pip install dlo                                     # definite stable version
git clone https://github.com/avkondepudi/dlo.git    # latest version
pip install .

Dependencies

  • requests (required)
  • pandas (recommended)

Usage

The API isn't publicly well-documented. You can find a list of endpoints here and here.

from dlo import Data                                # import module

LOCAL = {                                           # set local parameters
    "PlayerID": 1626156,
    "Season": "2018-19",
    "SeasonType": "Regular Season"
}

d = Data(**LOCAL)                                   # create instance of Data class with local parameters
d.endpoint = "playergamelog"                        # set endpoint

data = d.getData()                                  # get data (game log of D'Angelo Russell for 2018-19 Regular Season)

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

dlo-0.0.4.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

dlo-0.0.4-py3-none-any.whl (16.3 kB view hashes)

Uploaded Python 3

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