Skip to main content

A tool to automate and optimize DraftKings and FanDuel lineup construction.

Project description

Introduction · Build Status · ·

This is an incredibly powerful tool that can automate lineup building, allowing you to enter thousands of lineups in any DK contest in the time it takes you to grab a coffee. Works for NFL, NBA, WNBA and MLB on either DraftKings or FanDuel.

This project allows you to create an unlimited amount of optimized DraftKings lineups based on any projection source of your choice. You can use this repo as a command line application, or import functionality as needed to build your own scripts to construct thousands of DraftKings lineups each week and upload them in seconds using their CSV upload tool. Examples of how to do the latter are provided in the examples directory.

Special thanks to swanson, who authored this repo, which mine is heavily based off of.

Pre-reqs:

  • Python 3
  • pip install -r requirements.txt

Installation

pip install draftfast

Usage

from draftfast import rules
from draftfast.optimize import beta_run
from draftfast.orm import Player

player_pool = [
    Player(name='A1', cost=5500, proj=55, pos='PG'),
    Player(name='A2', cost=5500, proj=55, pos='PG'),
    Player(name='A3', cost=5500, proj=55, pos='SG'),
    Player(name='A4', cost=5500, proj=55, pos='SG'),
    Player(name='A5', cost=5500, proj=55, pos='SF'),
    Player(name='A6', cost=5500, proj=55, pos='SF'),
    Player(name='A7', cost=5500, proj=55, pos='PF'),
    Player(name='A8', cost=5500, proj=55, pos='PF'),
    Player(name='A9', cost=5500, proj=55, pos='C'),
    Player(name='A10', cost=5500, proj=55, pos='C'),
]

roster = beta_run(
    rule_set=rules.DK_NBA_RULE_SET,
    players=player_pool,
)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

draftfast-0.0.7.tar.gz (23.6 kB view details)

Uploaded Source

File details

Details for the file draftfast-0.0.7.tar.gz.

File metadata

  • Download URL: draftfast-0.0.7.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for draftfast-0.0.7.tar.gz
Algorithm Hash digest
SHA256 296d0f8775cd835618cc4e34d3a7eac5ab56a083a85cbb797f35d87e72b4a8b3
MD5 a92f30d8c3eb5e1218f41fe995ff2715
BLAKE2b-256 4ceef86f67c7e96249782a9fea3a54ffc75e6dcc8dd3b36465bc3de040d77a30

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