Skip to content

ashhhlynn/custom-fantasy-optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

171 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Fantasy Optimizer

Customizable fantasy football optimizer built with Python and PuLP linear programming. Optimizes DFS lineups for the highest projection under contest roster and salary rules, including configurable player locks, exclusions, stacking, and position controls.

Technologies

  • Python 3.8+
  • PuLP
  • DraftKings API
  • Sleeper API
  • Pandas
  • Streamlit

How It Works

  1. Fetches player pool for Sunday Classic contests from DraftKings API
  2. Fetches PPR projections from Sleeper API matched to player
  3. Allows interactive customization of constraints (locks, exclusions, stacks, position limits)
  4. Uses PuLP to maximize projected points under contest roster and salary rules
  5. Dashboard displays the optimized lineup

Constraint Customization

  • Lock or exclude players from your lineup
  • Require at least 1 FLEX from a specified team
  • QB + RB/WR/TE stacks (same team or opposing)
  • RB + DST stacks
  • Specify position for FLEX slot
  • Exclude players opposing your DST
  • Set limit of 1 RB per team

Media

Screenshot (130) Screenshot (144)

Setup

$ git clone https://github.com/ashhhlynn/custom-fantasy-optimizer.git
$ cd custom-fantasy-optimizer
$ pip install -r requirements.txt
$ streamlit run dfs.py

License

This project is MIT licensed.

About

Customizable fantasy football optimizer built with Python and PuLP linear programming. Optimizes highest projected DFS lineups under contest rules with configurable player locks, exclusions, stacking, and position controls.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages