A cleaner, more maintainable fantasy football reporting tool for ESPN leagues.
- Python 3.9+
- Weekly reports with detailed statistics
- Box scores with analysis of bench scoring and "what could have been" scenarios
- League standings and power rankings
- Points per player per position analysis
- Clean HTML reports with consistent styling
- Easy to run from the command line
- Clone this repository
- Install from Source with dependencies:
# for a regular installation
pip install .
# or install in development mode
pip install -e .
- Create a
.env
file with your ESPN API credentials (use.env.example
as a template)
# Using the run script
./run.sh
# Or using the CLI
ff weekly --open
ff weekly --week 10 --open
ff generate-all --start 1 --end 17
Usage: ff [OPTIONS] COMMAND [ARGS]...
Fantasy Football CLI application for generating reports and statistics.
Options:
--help Show this message and exit.
Commands:
generate-all Generate reports for all weeks in a range.
weekly Generate a weekly fantasy football report.
Weekly command options:
--year, -y INTEGER NFL season year to generate report for
--week, -w INTEGER NFL week to generate report for (0 for current week)
--output, -o TEXT Output file path (defaults to YEAR-weekWEEK.html)
--open, -p Open the report in a browser after generation
pip uninstall fantasy-football-reports
The packages setup.py
have to be removed individually.
ff/
- Main package directory__init__.py
- Package initialization__main__.py
- CLI entry pointconfig.py
- Configuration handlingdata.py
- ESPN API data retrievalstats.py
- Statistical calculationsreports.py
- Report generationtemplates.py
- HTML template handling
templates/
- Jinja2 HTML templatesrun.sh
- Convenience script for running the application
You can customize the report by:
- Editing the Jinja2 templates in the
templates/
directory - Adjusting the CSS styles in the base template
- Adding new statistical calculations to
stats.py
- Creating new report types in
reports.py