项目作者: DFrancis84
项目描述 :
Tool for doing fantasy football drafts
高级语言: Python
项目地址: git://github.com/DFrancis84/fantasy_football_draft.git
Draft.py
To install:
git clone git@github.com:DFrancis84/fantasy_football_draft.git
Required imports:
- csv
- sqlite3
- pyfiglet
pip install pyfiglet
- prettytable
pip install prettytable
What is draft.py?
Draft.py is an open source program that I created for my fantasy football league. We prefer to do live drafts and instead of having to write all the data down on a piece of paper, I decicded to write this program. It is very simple to use!
How to use draft.py?
To use draft.py:
- Clone draft.py onto your local machine
- CD into directory
- enter
python3 draft.py
- Screen will first prompt you to enter your league name
- This is used to create the
.db
file for the designated league name
- The next prompt will ask for the amount of teams in the league followed by a prompt to ask for number of rounds in the league.
- This is used for the base functionality of draft.py. It will take number of teams and multiply by number of rounds and output how many picks will take place in total for the draft.
- It also utilizes the number teams input by outputing a table every round completion based on number of teams entered.
- Will also prompt to determine if format is a standard snake draft or if you want to perform custom draft order.
- Go through the entire draft entering the prompts as they appear. With each entry, draft.py will store that data to a sqlite database for you to use to enter the results into your desired fantasy football host.
- After the final pick has been selected, it will output a table with every pick made for the draft, while finalizing the created database for easy querying.
- The final step is creating a
.csv
file of your draft. This can be used to upload results if provider accepts .csv
file.
Schema for sqlite database:
- pick - INTEGER Primary Key, AutoIncrement
- manager - TEXT
- player - TEXT
- position - TEXT
- nflteam - _TEXT
What’s next?
With the base of the program live, there are a few more things that I want to add to the program. They are as follows:
- Would like to query against the database and prevent user from being able to enter the same name twice
- To piggyback off of #1, Would like to be able to have the list of ALL players loaded to where you can ensure that you have the right names, and possibly even be able to select from said list
Copyright © 2019 DFrancis84