Skip to main content

DFSLineupOptimizer n-roth12 PyPI version

A Python project for generating NFL daily fantasy contest lineups.

Installation

As Package

To install and use as a Python package:

python3 -m pip install lineup-optimizer

Repo

Clone the repository onto your machine to get started. Ensure you have Python and pip installed, then set up the virtual environment using:

pipenv install -r "requirements.txt"
pipenv shell

This project currently only uses built-in Python modules, so this step is actually not required.

Usage

To generate an optimized lineup for a chosen DFS contest, go to the contest webpage and download the players list as a CSV, an option on almost all DFS sites. Then, place the CSV file into the root directory of the project. The examples below will use the name 'DKSalaries_example.csv' as a placeholder for one such CSV file. You can choose to generate lineups from the command line, or from within a Python script:

Import Package

from lineup_optimizer import optimize_lineup

lineup = optimize_lineup('DRAFTKINGS', 'DKSalaries_example.csv')
print(lineup)

Command Line

python optimize.py DRAFTKINGS DKSalaries_example.csv

These will output the lineup to the console.

About

Lineups are able to be generated following certain constraints called "Tags". In addition, TagsController can confirm whether a given Lineup conforms to the rules of specific tags, as well as output the list of Tags that the Lineup conforms to. Examples of such Tags are: "Stack: 4x2", "Build: 3 RB", "Punt: TE".

Metadata

Release files for lineup-optimizer 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lineup-optimizer 0.0.3
File Size Uploaded
lineup_optimizer-0.0.3.tar.gz 107.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lineup-optimizer 0.0.3
File Interpreter ABI Platform
lineup_optimizer-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 121.7 kB

Release files / lineup_optimizer-0.0.3.tar.gz

Download URL lineup_optimizer-0.0.3.tar.gz
Size 107.5 kB
Tags Source
SHA-256 checksum
How to use checksums
47c692724672a4c17016386bcea3a0e192ddf777408022781b180ead1426c6e8
BLAKE2b-256 checksum
How to use checksums
1c68947bccd2c836a6630859a6b837b03f8f3a065033090d546725152b29acdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / lineup_optimizer-0.0.3-py3-none-any.whl

Download URL lineup_optimizer-0.0.3-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a0637fb54c69093df911bfde1ebe3e8a0ceff6f4e2c8aed4a8318622e45f2d4
BLAKE2b-256 checksum
How to use checksums
5611471816eb636f8d994581b46de920bccdbeeeebb34d571b191fef875119fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

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