I made a python tool for doing this a couple of weeks ago. It solves the "knapsack problem with multiple constraints", using the OpenOpt knapsack module. Find the maximum sum of FPPG (fantasy points per game), with the constraints of $60k (fantasy) salary sum, and player positions.
It didn't work very well though, my generated NBA picks finished in the bottom 50% on FanDuel. For the next iteration, I'm going to try optimizing for MPG (minutes per game).
Fantasy betting has the benefit of a legal loophole, so it's growing much quicker than traditional sportsbook line betting.