BenBrostoff / draftfast

A tool to automate and optimize DraftKings and FanDuel lineup construction.
278 stars 113 forks source link

[Request]: Injest JSON #134

Closed robotfactory closed 5 years ago

robotfactory commented 5 years ago

It would be helpful to be able to injest a player list from a json file or json string object, similar to how .csv can be injested.

sharkiteuthis commented 5 years ago

agree. i'll assign it to myself

BenBrostoff commented 5 years ago

I'm going to close this, although you're welcome @robotfactory or @sharkiteuthis to take this on in a fork. I don't think ingesting JSON should be a responsibility of this repo; even the CSV ingestion stuff is iffy. My hope moving forward is we can keep draftfast small - there's definitely a lot of bloat already from just not having a good idea of where this would end up. I see the responsibilities of this library as:

How you construct the player_pool feels like a consumer and not library responsibility.

chppppp commented 4 years ago

Did anyone ever implement this?

BenBrostoff commented 4 years ago

No but I think I stand by that comment - Python has a json module and I think it's easy enough to do this outside the library. Worried about library bloat. I support CSVs because DraftKings and FanDuel provide them and over the last few years haven't changed the CSV format; for JSON, there's a question of what the JSON looks like and how to ingest it.

chppppp commented 4 years ago

Thanks for the fast reply Ben. I cant argue with your logic as the module is simple enough where the user can implement this stuff. I just love being lazy :) Thanks so much.