Repository navigation
Releases
fantasyfb v0.12.0
fantasyfb v0.12.0
Field-wide Scott Fish Bowl playoff odds, much faster season simulations, long-play bonus scoring for Sleeper leagues, and a round of bracket and standings fixes.
pip install --upgrade fantasyfbHighlights
- Field-wide Scott Fish Bowl odds. A new
fantasyfb.sfbpackage andsfb-fieldcommand collect every Sleeper league in the field and simulate them together, so a team's odds of making the playoffs, reaching each round and winning the title account for every other league. Each NFL player gets one shared draw per week and simulation, so teams that start the same players rise and fall together. Leagues on MyFantasyLeague are not simulated yet. - Which NFL players move the odds. The simulation now also measures each player's qualification swing and playoff swing for a one-standard-deviation better stretch, written to
players.csvand available asFieldResult.players. - Much faster season simulations and move analysis, with the same numbers. A rooting guide at 1,000 simulations now takes about 4 seconds on a 12-team league.
- Long-play bonuses for Sleeper leagues. Scott Fish Bowl-style scoring that pays for 20+ yard receptions, 40+ yard rushes and 40+ yard completions is now projected, which closes a gap of roughly 70 points per team per week. Leagues that don't score these projections are unchanged, and unsupported scoring categories now trigger a warning instead of being ignored silently.
- Sleeper league fixes. SFB leagues use the 11-week season and show 13+ win odds instead of a made-up bracket, "median game" leagues count the median win in standings, odds and records, and the Free agents tab no longer fills up with retired players.
- Bracket and lineup fixes. Playoff odds in leagues whose size is not a multiple of the bracket size no longer scramble the bracket, and which tied player fills a lineup slot no longer depends on row order.
- FLEX filter on the Moves tab's Adds view, and a season path on the My week tab that fits phone screens.
- Web app (in
app/, not part of the PyPI package). It can be added to a phone home screen, takes a typed number of simulations, shows a proper page for expired runs, installs pinned dependencies, and has adds, drops and the rooting guide on by default. A redesigned SFB playoff page is also inapp/sfb_siteand is built from the repo, not the package.
See CHANGELOG.md for the full list.
fantasyfb v0.11.0
fantasyfb v0.11.0
A rooting guide and PDF export for the HTML report, sortable free agents, and the groundwork for a hosted web app.
pip install --upgrade fantasyfbHighlights
- Rooting guide in the HTML report.
fantasyfb --format html --deltasnow adds a Rooting guide tab. For the team you pick, it lists this week's games with the change in your expected earnings if either side wins and a "Root for ..." call, plus a league-wide matrix shaded red to green. Previously--deltaswas silently ignored for HTML reports. - Save as PDF. The report has a print stylesheet and a "Save as PDF" button that prints every tab, one per page, following your selected team, sort order and filters.
- Matchup lineups in the Schedule tab. Click a game card to see both teams' projected starting lineups for the current week.
- Easier-to-read report tables. Free agents columns (Proj, Matchup, WAR, Bye, Rostered) are now click-to-sort, and Standings percentages sit under their headers. The Standings "Bye" column is renamed "First-round bye".
- Draft web app for Sleeper and Yahoo leagues. A small FastAPI app in
app/(not part of the PyPI package) runs season sims and serves the same HTML report. It supports Sleeper by league link and read-only Yahoo sign-in, and includes Cloud Run deployment files, run timeouts and queue limits. Adds, drops and the rooting guide are off by default in the app. Yahoo reports now carry the "Powered by Yahoo" badge. - Library changes for server use.
YahooTokenAuthkeeps a user's Yahoo tokens in memory, andYahooFantasyClient(oauth=...)accepts it.League(client=...)now setsnameandlg_idinstead of failing, and Ctrl-C is no longer swallowed by Yahoo query retries. - Offline end-to-end test of the weekly run. A snapshot test replays recorded league data through the full pipeline and checks invariants aimed at the game-day bugs earlier releases kept finding.
See CHANGELOG.md for the full list.
fantasyfb v0.10.0
fantasyfb v0.10.0
An interactive HTML report as an alternative to the Excel workbook, fresher data on game days, and several live-week projection fixes.
pip install --upgrade fantasyfbHighlights
- New interactive HTML report. Run
fantasyfb --format html(or--format both) to get a single self-contained.htmlfile you can open offline or email. It has tabs for your week (matchup card, outlook, season path, lineup and bench), standings, schedule, moves (adds, pickups, drops and trades), and free agents with search, position filter and a rostered % slider. A Viewing selector rescopes everything to any team in the league. The default is still--format excel, so existing behavior is unchanged. - Drop verdicts in the report are tunable. New
--drop-safe-thresholdand--drop-depth-thresholdflags (defaults -4 and -12) control the "Safe to cut", "Depth" and "Keep" labels. - Fresher NFL data on game days. In September through January, on every day except Wednesday and Friday, the CLI now caches NFL data for 30 minutes instead of 24 hours, so rerunning on Sunday or Monday picks up finished games without
--refresh-cache. This fixes finished teams still showing a nonzero chance of losing. - More accurate live-week and season projections. Players on IR are no longer counted as extra starters, team defenses now match their real stats instead of all getting a league-average projection, and kickers in distance-scored leagues no longer get an extra 3 points per made field goal.
- New dependency:
jinja2>=3.1is now required (used to render the report).
See CHANGELOG.md for the full list.
fantasyfb v0.9.0
fantasyfb v0.9.0
Live-week and depth-chart correctness fixes, plus removal of two long-dead V1 CLI flags.
pip install --upgrade fantasyfbHighlights
- Live-week projections and lineups now reflect games already in progress. Previously, a matchup's projected score and win probability stayed frozen at pre-kickoff values all Sunday, and players who had already started (and finished) their game could show as benched. Actual fantasy points are now blended in as games complete, and already-active players are correctly flagged as starters, so both
League's matchup projections andseason_simsreflect real-time state. - Depth-chart data cleaned up across several edge cases. Players with a secondary special-teams role (e.g. a WR who also returns punts) no longer get duplicated into multiple rows, which was corrupting lineup slot-filling for 200+ players league-wide.
MatchupModel's string-depth penalty no longer treats every WR2/WR3/RB2/TE2 as a backup, that per-position cutoff assumption only ever held for QB. 2025+ depth charts also no longer mislabel kickers with nflreadpy's newer"PK"code instead of"K". MoveAnalyzer.possible_pickupsno longer crashes on healthy drop candidates. ATypeErrorfired for any player being evaluated as a drop candidate who didn't have an active injury designation; free agents are now compared correctly in that case instead of raising.- Breaking change:
--gamesand--basaloppstringtimeremoved from the CLI, along with the correspondingLeague()parameters. Both flags were parsed but silently ignored downstream, so removing them changes nothing about actual behavior, but passing either now raises an error instead of quietly doing nothing.
See CHANGELOG.md for the full list.
fantasyfb v0.8.2
fantasyfb v0.8.2
Fixes ADP failing to join for players whose name carries a generational suffix (Jr./Sr./II/III/IV).
pip install --upgrade fantasyfbHighlights
- Suffixed player names now match against ADP.
merge_adpjoined projections onto ADP with an exact string match on[name, position]. FantasyPros-style ADP exports append generational suffixes (James Cook III,Travis Etienne Jr.,Kenneth Walker III) that the projections' nflreadpy-sourcednamecolumn omits (James Cook), so every suffixed player failed to join, gotNaNADP, and was treated as undraftable depth. The 2026 ADP file alone has 24 affected players, including early-round starters like James Cook (RB5), Kenneth Walker III (RB12), and Travis Etienne Jr. (RB20). The merge now runs on a suffix-stripped, whitespace-collapsed, lowercased join key while both display names are preserved; the ADP side is deduped on that key (earliest pick wins) so a collapsed namesake pair can't fan out a projection row.
See CHANGELOG.md for the full list.
fantasyfb v0.8.1
fantasyfb v0.8.1
Fixes current_team sticking to a player's previous team during the offseason/preseason.
pip install --upgrade fantasyfbHighlights
current_teamno longer lags a season behind during the offseason/preseason.add_depth_chartsalready pulled nflreadpy's live depth chart, which carries the correct current team, but only used its depth-chart-rank column, socurrent_teamkept coming from the season-locked roster snapshot until nflverse published the new season's roster file, well after free agency and trades happen. A player who changed teams (e.g. Stefon Diggs to WAS in 2026) showed up on their old team on the draft board until they played a current-season game.current_teamnow comes from the live depth chart wherever it's available.
See CHANGELOG.md for the full list.
fantasyfb v0.8.0
fantasyfb v0.8.0
Custom roster shapes for generic mock drafts, plus a fix for mock-opponent picks drifting from real-world ADP.
pip install --upgrade fantasyfbHighlights
- Custom roster shapes for generic mock drafts.
--roster-spotsonsnake-draftandsalary-cap-draftlets a--platform genericmock draft use any roster shape, extra flex, superflex viaQ/W/R/T, a bigger bench, instead of the fixed default, via comma-separatedPOSITION=COUNTpairs (e.g.QB=1,RB=2,W/R/T=2,Q/W/R/T=1,BN=6) or an interactive prompt when omitted.GenericClientandLeague(platform="generic")also accept aroster_spotsDataFrame directly for scripted use; an unrecognized position code raisesValueErrorat construction time instead of failing downstream in VORP/roster logic. random/random til menow stay closer to real-world ADP. Simulated opponents' candidate pool was ranked top-VORP-first, with ADP only reweighting sampling within that already VORP-biased shortlist, so mock opponents routinely reached for players far ahead of their market ADP. The pool is now windowed to players withinwindow_roundsof the current overall pick (mirroring thenearestview) before ranking by need-adjusted VORP, so simulated drafts read as more realistic.
See CHANGELOG.md for the full list.
fantasyfb v0.7.0
fantasyfb v0.7.0
Multi-platform league support: SleeperClient and a fully synthetic generic mock mode join Yahoo behind a shared FantasyPlatformClient interface, with --platform now available across all three draft CLIs. Also includes dual (position + flex) VORP, simadd win/earnings-delta evaluation during live drafts, and a rebranded navy/green logo.
pip install --upgrade fantasyfbHighlights
- Sleeper and generic mock leagues, alongside Yahoo.
League(platform="yahoo"|"sleeper"|"generic")picks its backend through a sharedFantasyPlatformClientinterface. Sleeper reads a league's real rosters/scoring/schedule from its public API with zero credentials, just asleeper_league_id.genericneeds nothing at all: it synthesizes teams, rosters, and a round-robin schedule against the real current NFL player pool, and is now the default platform when--platformis omitted.--platform/--sleeper-league-id/--num-teams/--mock-scoringare wired into all three draft CLIs (snake-draft,salary-cap-draft,draft-prep). - Dual VORP: position-specific and flex-aware.
compute_vorpnow also emitsflex_replacement_rate,vorp_flex_per_game, andvorp_flex_season, computed against the combined pool of everyone eligible for the deepest flex slot. In a superflex league this correctly compresses QB value since the superflex slot would otherwise go to a WR/RB/TE. Every draft decision surface (cockpitvorp_adjusted, salary cap dollar values, mock draft strategies) now runs on flex VORP by default. simadd: sim a hypothetical pick before committing. New command onsnake-draftandsalary-cap-draftsims the top-N available candidates per position and ranks them by win/playoff/earnings delta from a cached baseline, so you can evaluate a pick's real impact mid-draft. Onsalary-cap-draft, each candidate is priced at itsmax_my_bidbefore the hypothetical add is simulated, since adding a candidate there costs cap space rather than being free.best/simaddnow prompt for pool and scoring instead of a combinatorial explosion of separate commands (nearest,bestball,nearestbestball,nearestsimadd,bestballsimaddare gone). Pick best-available vs. nearest-ADP, and normal vs. bestball-upside scoring, interactively.- Rebranded logo and docs site. New navy/green "FFB51" mark replaces the old navy/gold snake-and-shield. The docs site's Yahoo-only setup page is now Connecting a league, covering the credential-free Sleeper and generic options alongside Yahoo OAuth.
Also in this release
- ADP blended into
random/random til me's auto-pick sampling weights, so a market-favorite with poor personal-VORP standing (or vice versa) doesn't get picked as often. --fresh-draftonsnake-draft/salary-cap-draftfor mock-drafting against a league's current settings without keeper-preservation logic kicking in.- Persistent, filesystem-backed
nflreadpycaching (24h TTL) so repeated draft-prep CLI runs reuse a warm cache instead of re-downloading;--refresh-cacheforces a fresh pull. YahooFantasyClient.list_team_names(season)for resolving a multi-team account's teams without the old interactive-input()-only path (which hung in non-interactive contexts like a Streamlit app).- Breaking change:
--sfbremoved fromsnake-draft/draft-prep, along withLeague(sfb=...). Use--platform sleeper --sleeper-league-id <id>instead, which now pulls a live Sleeper league's scoring/roster settings directly, including SFB leagues. - Several offline-draft-prep crash fixes:
NflreadpyProvider.get_depth_chartsandPlayerDataManager.add_injuriesno longer hard-fail on a cold cache with no network. connect_to_leaguefix for accounts with teams spread across multiple leagues in the same season, where the wrong league could silently get selected.PlayerDataManager.map_player_idsnow honors Sleeper-resolved player IDs instead of assuming Yahoo-shaped IDs everywhere.
See CHANGELOG.md for the full list.
fantasyfb v0.6.0
fantasyfb v0.6.0
Sleeper-native scoring for SFB-style leagues (Third-Round Reversal, stacking yardage bonuses), V2 projection engine now the sole engine after winning the V1 bake-off (#24), and a new MkDocs documentation site (#21).
pip install --upgrade fantasyfbHighlights
- Sleeper scoring/roster settings, pulled live. New
data/sleeper_client.pyreads a league's scoring rules, roster spots, and Third-Round Reversal setting straight from Sleeper's public API — no more hand-transcribing from a promo image. - Third-Round Reversal draft order.
MockDraftand the live snake-draft cockpit support TRR pick order via--reversal-round, matching Sleeper's own draft setting. - Stacking yardage-bonus scoring.
FantasyScorersupports stackingPass 300+/400+andRush/Rec 100+/200+tiers, needed to accurately score SFB16's ruleset. --sfbon the CLI. Previously only reachable via aLeague()kwarg, now exposed onsnake-draftanddraft-prep.- Fitted matchup weights by default.
League(fit_matchup=True)is now the default; a 2024 walk-forward backtest showed the fitted weights beat hand-tuned defaults on RMSE. - V1 projection engine retired. V2 beat V1 by 5.7% overall MAE in a walk-forward bake-off across 2023-2024, so V1 is gone.
- Docs site is live. MkDocs Material site at https://tefirman.github.io/fantasyfb/ — install, Yahoo OAuth setup, CLI reference, and auto-generated API docs, deployed on every push to
main.
Also in this release
scripts/build-assets.pyregenerates the docs-site logo variants from the high-res master.
See CHANGELOG.md for the full list.
fantasyfb v0.5.0
fantasyfb v0.5.0
Best ball support across the draft and simulation stack (#31), and cost-plus-N keeper support across the salary cap V2 stack (#29).
pip install --upgrade fantasyfbHighlights
- Best ball drafts and sims.
SeasonSimulator.simulate_season(best_ball=True)auto-fills the optimal weekly lineup (fixed slots greedily, then flex), and snake-draft cockpit gainsbestball/nearestbestballcommands that rank players by upside-weighted VORP (points_rate + 0.5 × points_stdev − replacement_rate) — high-ceiling players climb the board because their boom weeks always count. - Best ball–aware projections.
compute_best_ball_team_projectionsMonte Carlos per-player weekly projections into team-level(avg, stdev)for the season simulator, capturing the variance benefit that comes from competing players for the same slot. - Cost-plus-N keeper pricing. New
--keeper-surchargeflag (default5) onsalary-cap-draft; keeper price = last year's salary + surcharge. Pass--keeper-surcharge 0for the previous behavior of using the CSV salary as-is. - Keepers wired through the salary cap V2 stack.
build_boardaccepts akeepersDataFrame and excludes keeper players from the dollar pool (VORP is still computed on the full pool for correct replacement levels), so inflation starts at ~1.0 regardless of how many keepers are in the league.MockSalaryCapDraftandbacktest_salary_valuesgain parallel keeper support for accurate mock drafts and surplus comparisons. - Per-team keeper budget validation. If any team's keeper commitments exceed the cap, those keepers are dropped with a warning before the draft starts. Resume-safe: keepers already present in an
--inprogressfile are skipped when--keepersis also passed. - Yahoo team name handling. Draft cockpits now default to real Yahoo team names instead of generic placeholders, and the keepers CSV
fantasy_teamcolumn accepts the user's actual Yahoo team name.
Also in this release
_simulate_playoffsguards against unsupported bracket sizes — anything other than 4 or 6 playoff teams returns early, covering DraftKings / Underdog best-ball formats with no traditional playoff bracket.build_boardno longer raisesKeyError: 'fantasy_team'when called on a bare projection pool.
See CHANGELOG.md for the full list.