Skip to main content

An unofficial DraftKings Client

Project description

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)

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

draft_kings-2.0.3.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

draft_kings-2.0.3-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file draft_kings-2.0.3.tar.gz.

File metadata

  • Download URL: draft_kings-2.0.3.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.5

File hashes

Hashes for draft_kings-2.0.3.tar.gz
Algorithm Hash digest
SHA256 b0a87b987f9e70e0c290a6c99def4f726cd5b31874b6b0edf1afb070c3dd10a6
MD5 a7bb11d0622d246defcc27fc1ec896b5
BLAKE2b-256 cc15dc1a67542ac4da73141089dd22d4a0f7103e0fcc7d31cbda8da9a98bc877

See more details on using hashes here.

File details

Details for the file draft_kings-2.0.3-py3-none-any.whl.

File metadata

  • Download URL: draft_kings-2.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.5

File hashes

Hashes for draft_kings-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 308faebc3d28338bae6b98f55ce00b965095b5d3cb92ea2fe91cb94b1c69ff0a
MD5 6417d9d27b299b2eb7f0db1977f3581b
BLAKE2b-256 6da6a5be50a433a68cfbaffa63eac4a84838224901816c8b2b9ccb78c638680c

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