pydfs-lineup-optimizer is a tool for creating optimal lineups for daily fantasy sport.
To install pydfs-lineup-optimizer, simply run:
$ pip install pydfs-lineup-optimizer
Now it supports following dfs sites:
League | DraftKings | FanDuel | FantasyDraft | Yahoo | FanBall | DraftKings Captain Mode | FanDuel Single Game | DraftKings Tiers |
---|---|---|---|---|---|---|---|---|
NFL | + | + | + | + | + | + | + | + |
NBA | + | + | + | + | - | + | + | + |
NHL | + | + | + | + | - | + | + | + |
MLB | + | + | + | + | - | + | + | + |
WNBA | + | + | - | - | - | + | - | - |
Golf | + | + | + | + | - | - | - | - |
Soccer | + | - | - | + | - | + | - | - |
CFL | + | - | - | - | - | - | - | - |
LOL | - | + | - | - | - | + | + | - |
MMA | + | + | - | - | - | - | - | - |
NASCAR | + | + | - | - | - | - | - | - |
Tennis | + | - | - | - | - | - | - | - |
CSGO | + | - | - | - | - | - | - | - |
Documentation is available at https://pydfs-lineup-optimizer.readthedocs.io/en/latest
Here is an example for evaluating optimal lineup for Yahoo fantasy NBA. It loads players list from "yahoo-NBA.csv" and select 10 best lineups.
from pydfs_lineup_optimizer import Site, Sport, get_optimizer
optimizer = get_optimizer(Site.YAHOO, Sport.BASKETBALL)
optimizer.load_players_from_csv("yahoo-NBA.csv")
for lineup in optimizer.optimize(10):
print(lineup)