Skip to main content

DraftKings Python Client

Build Status codecov PyPI

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)

Source distribution for draft-kings 2.0.2
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

Release history Release notifications | RSS feed

3.1.0

2 release files

3.0.0

2 release files

2.0.3

2 release files

This release

2.0.2 This release

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.0

1 release file

0.9

2 release files

0.8

2 release files

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

0.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