DraftKings Python Client
Introduction
DraftKings does not have a public API with documentation.
However, one can identify network API calls to fetch data from DraftKings - data like NFL contests, or players available for a "Draft Group" (e.g. all NBA games starting at 7 PM EST tonight), along with relevant metadata.
As DraftKings makes no guarantees about it's public API, this client makes no guarantees that existing API methods will work consistently.
Install using PyPi
pip install draft_kings
API
Get Contests for a Sport
from draft_kings.data import Sport
from draft_kings.client import contests
contests(sport=Sport.NBA)
Get Available Players for a Draft Group
from draft_kings.client import available_players
available_players(draft_group_id=1)
Get Draft Group Details
from draft_kings.client import draft_group_details
draft_group_details(draft_group_id=1)
Get Countries
Get all country information that DraftKings uses to make country-specific requests
from draft_kings.client import countries
countries()
Get Regions
Get all region information for the specified country code that DraftKings uses to make region-specific requests
from draft_kings.client import regions
regions(country_code='US')
Get Draftables
Get all draftable players
from draft_kings.client import draftables
draftables(draft_group_id=1)
Release files for draft-kings 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| draft_kings-2.0.2.macosx-10.15-x86_64.tar.gz | 10.7 kB | Details |
Release files / draft_kings-2.0.2.macosx-10.15-x86_64.tar.gz
| Download URL | draft_kings-2.0.2.macosx-10.15-x86_64.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f56ac9e6c89d148b605bc9c5fe0a7d133ea48a141347f881875c2b4c33c814a
|
|
BLAKE2b-256 checksum How to use checksums |
b3ca92bb44a09d61c47ba208d982d72489bacd9675aec34e78ecd89fc6062e62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6
|